summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2018-08-16 15:36:28 +0200
committerMichael Niedermayer <[email protected]>2018-11-01 00:52:46 +0100
commit24add16a323630d38be67203b2272b951ce68575 (patch)
tree585c3322af81102a8749dccdb36701665036c030
parent44ebea8657e2c786b8b22ebee69d97a2b0efd07f (diff)
avformat/mlvdec: read_string() received unsigned size, make the argument unsigned
Fixes: infinite loop Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04 Found-by: Paul Ch <[email protected]> Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 1e71cb2c8edcf3dad657c15a6fb8572862f2afb9) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/mlvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 319cd26de4..6d774a191d 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) {