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

Detect/report ftell() failure

CID 319007
parent 1692de5e
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -156,6 +156,12 @@ int pktdump(FILE* fp, const char* fname, FILE* good, FILE* bad)
while(!feof(fp)) {
offset=ftell(fp);
if(offset < 0) {
printf("%s ERROR %d getting offset!\n"
,fname
,errno);
break;
}
if(fread(&pkdmsg.type, 1, sizeof(pkdmsg.type), fp) != sizeof(pkdmsg.type))
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment