mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/av1dec: Check for unset obu instead of crashing
Fixes: NULL pointer dereference Fixes: 26550/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5417762807349248 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
343c3149ab
commit
718e862da3
@ -673,7 +673,12 @@ static int av1_decode_frame(AVCodecContext *avctx, void *frame,
|
||||
for (int i = 0; i < s->current_obu.nb_units; i++) {
|
||||
CodedBitstreamUnit *unit = &s->current_obu.units[i];
|
||||
AV1RawOBU *obu = unit->content;
|
||||
const AV1RawOBUHeader *header = &obu->header;
|
||||
const AV1RawOBUHeader *header;
|
||||
|
||||
if (!obu)
|
||||
continue;
|
||||
|
||||
header = &obu->header;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Obu idx:%d, obu type:%d.\n", i, unit->type);
|
||||
|
||||
switch (unit->type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user