mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/cbs_vp9: Check data_size
Fixes: out of array access Fixes: 19542/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5659498341728256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
398a5f5d8f
commit
4fa2d5a692
|
@ -416,6 +416,9 @@ static int cbs_vp9_split_fragment(CodedBitstreamContext *ctx,
|
|||
uint8_t superframe_header;
|
||||
int err;
|
||||
|
||||
if (frag->data_size == 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
// Last byte in the packet.
|
||||
superframe_header = frag->data[frag->data_size - 1];
|
||||
|
||||
|
|
Loading…
Reference in New Issue