Commit 1283c424 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hq_hqa: Fix runtime error: left shift of negative value -207

Fixes: 1375/clusterfuzz-testcase-minimized-6070134701555712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2ef0f392
...@@ -68,11 +68,11 @@ static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64], ...@@ -68,11 +68,11 @@ static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64],
memset(block, 0, 64 * sizeof(*block)); memset(block, 0, 64 * sizeof(*block));
if (!is_hqa) { if (!is_hqa) {
block[0] = get_sbits(gb, 9) << 6; block[0] = get_sbits(gb, 9) * 64;
q = ff_hq_quants[qsel][is_chroma][get_bits(gb, 2)]; q = ff_hq_quants[qsel][is_chroma][get_bits(gb, 2)];
} else { } else {
q = ff_hq_quants[qsel][is_chroma][get_bits(gb, 2)]; q = ff_hq_quants[qsel][is_chroma][get_bits(gb, 2)];
block[0] = get_sbits(gb, 9) << 6; block[0] = get_sbits(gb, 9) * 64;
} }
for (;;) { for (;;) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment