avcodec/diracdec: Propagate errors from dirac_get_arith_uint()

Testcase: 11663/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5636791864918016

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:
Michael Niedermayer 2019-01-08 23:29:38 +01:00
parent 6dde65d7c0
commit 6ed3d0e01c
3 changed files with 5 additions and 0 deletions

View file

@ -537,6 +537,8 @@ static inline int codeblock(DiracContext *s, SubBand *b,
buf = b->ibuf + top * b->stride;
if (is_arith) {
for (y = top; y < bottom; y++) {
if (c->error)
return c->error;
for (x = left; x < right; x++) {
if (b->pshift) {
coeff_unpack_arith_10(c, qfactor, qoffset, b, (int32_t*)(buf)+x, x, y);