avcodec/diracdec: Check for arith decoder errors in dirac_unpack_block_motion_data()

Fixes: Timeout (54sec -> 188ms)
Fixes: 14585/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5649933052411904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/315/head
Michael Niedermayer 6 years ago
parent 8eecf761a6
commit 90db25a16e
  1. 5
      libavcodec/diracdec.c

@ -1551,6 +1551,11 @@ static int dirac_unpack_block_motion_data(DiracContext *s)
}
}
for (i = 0; i < 4 + 2*s->num_refs; i++) {
if (arith[i].error)
return arith[i].error;
}
return 0;
}

Loading…
Cancel
Save