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

Fix CID 174408 Unchecked return value from library (fseek)

parent 39934b3b
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6274 failed
......@@ -204,7 +204,12 @@ int main(int argc, char **argv)
continue;
}
fseek(f, -128, SEEK_END);
if (fseek(f, -128, SEEK_END) != 0) {
fclose(f);
fprintf(stderr, "Unable to seek to beginning of SAUCE record in %s.\n", argv[i]);
continue;
}
if (fread(&sauce, sizeof(sauce), 1, f) < 1) {
fclose(f);
fprintf(stderr, "Unable to read SAUCE record from %s.\n", argv[i]);
......
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