[FFmpeg-cvslog] avformat/mlvdec: read_string() received unsigned size, make the argument unsigned

Michael Niedermayer git at videolan.org
Tue Nov 20 18:39:31 EET 2018


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Thu Aug 16 15:36:28 2018 +0200| [b671ebfd61b64b5e336f747b8a6abd59a535454d] | committer: Michael Niedermayer

avformat/mlvdec: read_string() received unsigned size, make the argument unsigned

Fixes: infinite loop
Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04

Found-by: Paul Ch <paulcher at icloud.com>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 1e71cb2c8edcf3dad657c15a6fb8572862f2afb9)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mlvdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 4b3bdc1eca..84b916844c 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -76,7 +76,7 @@ static int check_file_header(AVIOContext *pb, uint64_t guid)
     return 0;
 }
 
-static void read_string(AVFormatContext *avctx, AVIOContext *pb, const char *tag, int size)
+static void read_string(AVFormatContext *avctx, AVIOContext *pb, const char *tag, unsigned size)
 {
     char * value = av_malloc(size + 1);
     if (!value) {



More information about the ffmpeg-cvslog mailing list