fix: use of uninitialized memory

int selected[NPAT];
[...]
fill_buffer([...], selected);
->[...]
if (pat_no % npasses == 0) {
    for (i = 0; i < NPAT; i++) {
	selected[i] = 0;
    }
} -> false
[...]
if (selected[i] == 0) // access to uninitialized memory!!!
pull/139/head
safocl 2025-01-30 04:33:00 +04:00
parent 75dcdc2cf3
commit 9adc98352d
1 changed files with 1 additions and 1 deletions

View File

@ -1722,7 +1722,7 @@ static int destroy_record(ntfs_volume *nv, const s64 record,
unsigned long int pass, i;
s64 j;
unsigned char * a_offset;
int selected[NPAT];
int selected[NPAT] = {0};
file = (struct ufile *) malloc(sizeof(struct ufile));
if (file == NULL) {