[FFmpeg-cvslog] avformat/rmdec: rm_read_extradata: add error message for oversized extradata

Michael Niedermayer git at videolan.org
Sun Jan 18 00:36:50 CET 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Sat Dec  6 00:17:30 2014 +0100| [aded1110a32e7a14569d9128992c43fee18a2ed8] | committer: Michael Niedermayer

avformat/rmdec: rm_read_extradata: add error message for oversized extradata

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 50f9de59a08f4bbacda298377339318e3eb87b8e)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/rmdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 314c141..d281228 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -86,8 +86,10 @@ static void get_str8(AVIOContext *pb, char *buf, int buf_size)
 
 static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned size)
 {
-    if (size >= 1<<24)
+    if (size >= 1<<24) {
+        av_log(avctx, AV_LOG_ERROR, "extradata size %u too large\n", size);
         return -1;
+    }
     if (ff_get_extradata(avctx, pb, size) < 0)
         return AVERROR(ENOMEM);
     return 0;



More information about the ffmpeg-cvslog mailing list