This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 06d19d000d avformat/rsd: reject short ADPCM_THP extradata reads
06d19d000d is described below

commit 06d19d000d8e659e09490bfbcceaa6bb23fb2edb
Author:     Weidong Wang <[email protected]>
AuthorDate: Sat Mar 14 13:18:41 2026 -0500
Commit:     michaelni <[email protected]>
CommitDate: Sat Mar 21 00:29:04 2026 +0000

    avformat/rsd: reject short ADPCM_THP extradata reads
    
    Use ffio_read_size() to enforce exact-length reads of the per-channel
    ADPCM_THP coefficient tables. Previously the return value of
    avio_read() was unchecked, silently accepting truncated extradata.
---
 libavformat/rsd.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index b9098646f6..8eb9f901e1 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -22,6 +22,7 @@
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "avio.h"
+#include "avio_internal.h"
 #include "demux.h"
 #include "internal.h"
 
@@ -131,9 +132,9 @@ static int rsd_read_header(AVFormatContext *s)
             return ret;
 
         for (i = 0; i < par->ch_layout.nb_channels; i++) {
-            if (avio_feof(pb))
-                return AVERROR_EOF;
-            avio_read(s->pb, st->codecpar->extradata + 32 * i, 32);
+            ret = ffio_read_size(s->pb, st->codecpar->extradata + 32 * i, 32);
+            if (ret < 0)
+                return ret;
             avio_skip(s->pb, 8);
         }
         break;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to