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:
Erik Faye-Lund
2025-08-11 15:30:35 +02:00
committed by Marge Bot
parent bf3605a189
commit f886e08f36
+4 -1
View File
@@ -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) {