mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
wavpack: check K, fix assertion failure
Instead of this it would be possible to change the code to support larger K but that would make the code slower and probably still need checks on K. This variant is choosen as there are no known valid files that need larger K Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
81e85bc95c
commit
c6831e2a70
@ -373,6 +373,10 @@ static int wv_get_value(WavpackFrameContext *ctx, GetBitContext *gb,
|
||||
INC_MED(2);
|
||||
}
|
||||
if (!c->error_limit) {
|
||||
if (add >= 0x2000000U) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "k %d is too large\n", add);
|
||||
goto error;
|
||||
}
|
||||
ret = base + get_tail(gb, add);
|
||||
if (get_bits_left(gb) <= 0)
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user