diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-12 19:43:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-27 19:01:38 +0200 |
commit | 90db25a16e5aa0a7bfd78397298febd3eb121828 (patch) | |
tree | cdb4d8a6ad8887294891dd35c8711c957f5542ce /libavcodec/diracdec.c | |
parent | 8eecf761a65baf4ce6f25c0a149819cc9414c0f0 (diff) | |
download | ffmpeg-90db25a16e5aa0a7bfd78397298febd3eb121828.tar.gz |
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>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r-- | libavcodec/diracdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index a5bb6d5f34..52a1951690 100644 --- a/libavcodec/diracdec.c +++ b/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; } |