Commit e2bbb95d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 -...

avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - -130689706 cannot be represented in type 'int'

Fixes: 2038/clusterfuzz-testcase-minimized-4521466148159488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 29808fff
......@@ -248,7 +248,7 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
add -= (mid - (unsigned)base);
base = mid;
} else
add = mid - base - 1;
add = mid - (unsigned)base - 1;
mid = (base * 2U + add + 1) >> 1;
}
ret = mid;
......
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