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:
authorMichael Niedermayer <michael@niedermayer.cc>2019-10-18 00:57:26 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-09 18:02:43 +0300
commit17603094d57faf95bee00d557fe6de84a05352ef (patch)
tree0b39deed4d151dc3a85e30b0ec141ee1c4f75c6d /libavcodec/rasc.c
parentdf498cf544fd4690e5a246925e4de1125b57795b (diff)
avcodec/rasc: Check input size in decode_fint()
Fixes: Timeout (11sec -> 42ms) Fixes: 18287/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5637866331308032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/rasc.c')
-rw-r--r--libavcodec/rasc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c
index 21fc43f325..cdf20a6db9 100644
--- a/libavcodec/rasc.c
+++ b/libavcodec/rasc.c
@@ -124,6 +124,8 @@ static int decode_fint(AVCodecContext *avctx,
clear_plane(avctx, s->frame1);
return 0;
}
+ if (bytestream2_get_bytes_left(gb) < 72)
+ return AVERROR_INVALIDDATA;
bytestream2_skip(gb, 8);
w = bytestream2_get_le32(gb);