Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/nutdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index e14d118bb8..e86d8222d0 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -286,6 +286,11 @@ static int decode_main_header(NUTContext *nut)
ret = AVERROR_INVALIDDATA;
goto fail;
}
+ if (tmp_size < 0 || tmp_size > INT_MAX - count) {
+ av_log(s, AV_LOG_ERROR, "illegal size\n");
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
+ }
for (j = 0; j < count; j++, i++) {
if (i == 'N') {