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>2020-05-30 01:43:46 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 14:33:45 +0300
commit14fe71f5dcce45c02cdc65b7dcf3ce6660f8776d (patch)
tree2d98915c5401b56fd0c3ff95dd4580f53748beb2 /libavcodec
parent9f1cb0b89018f1da44dfa48c3268ba4606d931f2 (diff)
avcodec/hq_hqa: Check info size
Fixes: assertion failure Fixes: 21079/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5737046523248640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit cf28521fee22dbe2f7eeb8ab0306c0fd0802c48a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hq_hqa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index eec2e980b3..8404e80ec8 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -321,7 +321,7 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, void *data,
int info_size;
bytestream2_skip(&ctx->gbc, 4);
info_size = bytestream2_get_le32(&ctx->gbc);
- if (bytestream2_get_bytes_left(&ctx->gbc) < info_size) {
+ if (info_size < 0 || bytestream2_get_bytes_left(&ctx->gbc) < info_size) {
av_log(avctx, AV_LOG_ERROR, "Invalid INFO size (%d).\n", info_size);
return AVERROR_INVALIDDATA;
}