diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-09-23 20:52:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-12-02 03:14:48 +0100 |
commit | 4949e34d96cc751aedaace02123c2fb02b5ac174 (patch) | |
tree | d10706fd5f6596e1b3353e4d93676c4dbae6e386 | |
parent | cdce6a8b97c3b7ef5bc0ef05b28adbfa96c29a4a (diff) | |
download | ffmpeg-4949e34d96cc751aedaace02123c2fb02b5ac174.tar.gz |
avcodec/eatgq: Check bytestream2_get_buffer() for failure
Fixes: Use of uninitialized memory
Fixes: 71546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGQ_fuzzer-5607656650244096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/eatgq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index 3596d00e6f..efcad62df1 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -209,7 +209,8 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, dc[4] = bytestream2_get_byte(gbyte); dc[5] = bytestream2_get_byte(gbyte); } else if (mode == 6) { - bytestream2_get_buffer(gbyte, dc, 6); + if (bytestream2_get_buffer(gbyte, dc, 6) != 6) + return AVERROR_INVALIDDATA; } else if (mode == 12) { for (i = 0; i < 6; i++) { dc[i] = bytestream2_get_byte(gbyte); |