mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-01 05:56:38 +02:00
svq3: use memmove to avoid overlap in memcpy.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
212960eea4
commit
4c8ce750ab
@ -792,8 +792,8 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
|
||||
header ^ s->watermark_key);
|
||||
}
|
||||
if (length > 0) {
|
||||
memcpy((uint8_t *) &h->gb.buffer[get_bits_count(&h->gb) >> 3],
|
||||
&h->gb.buffer[h->gb.size_in_bits >> 3], length - 1);
|
||||
memmove((uint8_t *) &h->gb.buffer[get_bits_count(&h->gb) >> 3],
|
||||
&h->gb.buffer[h->gb.size_in_bits >> 3], length - 1);
|
||||
}
|
||||
skip_bits_long(&h->gb, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user