Skip to content
Snippets Groups Projects
Commit daa1b788 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

NUL-terminate the SMB fileidxrec_t.name field, just in case

The terminating NUL is actually part of the index record, but with file
corruption, it's technically possible the NUL could be missing.

Fixes CID 509554
parent 9bddabc1
No related branches found
No related tags found
No related merge requests found
......@@ -630,6 +630,7 @@ void dumpindex(ulong start, ulong count)
fseek(smb.sid_fp,((start-1L) + l) * idxreclen,SEEK_SET);
if(!fread(&fidx,sizeof(fidx),1,smb.sid_fp))
break;
TERMINATE(fidx.name);
printf(" %02X %.*s", fidx.hash.flags, (int)sizeof(fidx.name), fidx.name);
}
printf("\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment