[FFmpeg-cvslog] avformat/iamf_reader: propagate avio_skip() error values

James Almer git at videolan.org
Thu Mar 21 14:09:15 EET 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Mar 20 23:52:36 2024 -0300| [97d2990ea6241a569bc4c259d427f7739c97d766] | committer: James Almer

avformat/iamf_reader: propagate avio_skip() error values

Fixes: null pointer derference
Fixes: 67007/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6522819204677632

Tested-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97d2990ea6241a569bc4c259d427f7739c97d766
---

 libavformat/iamf_reader.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavformat/iamf_reader.c b/libavformat/iamf_reader.c
index 42d20f1ae6..270cfac389 100644
--- a/libavformat/iamf_reader.c
+++ b/libavformat/iamf_reader.c
@@ -310,10 +310,8 @@ int ff_iamf_read_packet(AVFormatContext *s, IAMFDemuxContext *c,
             c->recon_size = 0;
         } else {
             int64_t offset = avio_skip(pb, obu_size);
-            if (offset < 0) {
-                ret = offset;
-                break;
-            }
+            if (offset < 0)
+                return offset;
         }
         max_size -= len;
         if (max_size < 0)



More information about the ffmpeg-cvslog mailing list