aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mlvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-08-16 15:36:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-10-07 21:34:00 +0200
commit0f36c5f5c7763217de433602c280a0b3769d61d7 (patch)
tree69daf78ced9dbbb875fdb7a14c9a26c98106c740 /libavformat/mlvdec.c
parent3f095c5b56ba11b6fa684c7fb3343bd0f14f19e2 (diff)
downloadffmpeg-0f36c5f5c7763217de433602c280a0b3769d61d7.tar.gz
avformat/mlvdec: read_string() received unsigned size, make the argument unsigned
Fixes: infinite loop Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04 Found-by: Paul Ch <paulcher@icloud.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1e71cb2c8edcf3dad657c15a6fb8572862f2afb9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mlvdec.c')
-rw-r--r--libavformat/mlvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index d387c871ee..ded8196af2 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -77,7 +77,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) {