mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
wavpackenc: assert on too small buffer
bytestream2_* will not cause buffer overflow, but in that case, this means the allocation would be incorrect and the encoded result invalid. Therefore, assert no overflow occurred. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a9f3bb14ba
commit
4a5cc34b46
@ -2813,6 +2813,8 @@ static int wavpack_encode_block(WavPackEncodeContext *s,
|
||||
block_size = bytestream2_tell_p(&pb);
|
||||
AV_WL32(out + 4, block_size - 8);
|
||||
|
||||
av_assert0(put_bits_left(&s->pb) > 0);
|
||||
|
||||
return block_size;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user