avcodec/hq_hqa: Check available space before reading slice offsets
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 11 May 2019 21:05:47 +0000 (23:05 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 12 May 2019 14:35:30 +0000 (16:35 +0200)
commita649b62b903c2d15070dd464406e4886346793df
treef62e1fa0e8173c1e65f370fa5623ff4de50b192a
parent9fad760f56483f0b5503457c780d9f80a84784c6
avcodec/hq_hqa: Check available space before reading slice offsets

Fixes: Timeout (43sec -> 18sec)
Fixes: 14556/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5673543024508928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 407e7c34ca8a3047e4f1b14287053638b4add68d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/hq_hqa.c