mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-09 00:40:27 +00:00
avcodec/dxv: Check that we initialize op_data
Fixes: 431665305/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_DEC_fuzzer-5339599339847680
Fixes: use of uninitialized memory
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 6a8c41dcac)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a9ec831749
commit
eebf2b2c3f
1 changed files with 3 additions and 1 deletions
|
|
@ -274,7 +274,9 @@ static int dxv_decompress_opcodes(GetByteContext *gb, void *dstp, size_t op_size
|
|||
|
||||
if ((flag & 3) == 0) {
|
||||
bytestream2_skip(gb, 1);
|
||||
bytestream2_get_buffer(gb, dstp, op_size);
|
||||
int read_size = bytestream2_get_buffer(gb, dstp, op_size);
|
||||
if (read_size != op_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
} else if ((flag & 3) == 1) {
|
||||
bytestream2_skip(gb, 1);
|
||||
memset(dstp, bytestream2_get_byte(gb), op_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue