From f886e08f365609ac5d941e124e85a88a6ff78755 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 11 Aug 2025 15:30:35 +0200 Subject: [PATCH] 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 Part-of: --- src/panfrost/tools/panfrostdump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panfrost/tools/panfrostdump.c b/src/panfrost/tools/panfrostdump.c index 987663dd652..4837a9f6c39 100644 --- a/src/panfrost/tools/panfrostdump.c +++ b/src/panfrost/tools/panfrostdump.c @@ -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) {