pan/decode: detect error on fseek
We do this for other calls to fseek here, so let's be consistent. CID: 1659325 Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36724>
This commit is contained in:
committed by
Marge Bot
parent
bf3605a189
commit
f886e08f36
@@ -358,7 +358,10 @@ main(int argc, char *argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
fseek(data_fp, doh.file_offset, SEEK_SET);
|
||||
if (fseek(data_fp, doh.file_offset, SEEK_SET)) {
|
||||
perror("fseek error");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
nbytes = fread(bos[j], 1, doh.file_size, data_fp);
|
||||
if (nbytes < doh.file_size) {
|
||||
|
||||
Reference in New Issue
Block a user