mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/gdv: Check available space before reading palette
Fixes: Timeout Fixes: 2926/clusterfuzz-testcase-498711001458278 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
62702eebde
commit
0561bd2fc2
1 changed files with 2 additions and 0 deletions
|
|
@ -427,6 +427,8 @@ static int gdv_decode_frame(AVCodecContext *avctx, void *data,
|
|||
case 1:
|
||||
memset(gdv->frame + PREAMBLE_SIZE, 0, gdv->frame_size - PREAMBLE_SIZE);
|
||||
case 0:
|
||||
if (bytestream2_get_bytes_left(gb) < 256*3)
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (i = 0; i < 256; i++) {
|
||||
unsigned r = bytestream2_get_byte(gb);
|
||||
unsigned g = bytestream2_get_byte(gb);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue