mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 22:10:34 +00: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);
|
header ^ s->watermark_key);
|
||||||
}
|
}
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
memcpy((uint8_t *) &h->gb.buffer[get_bits_count(&h->gb) >> 3],
|
memmove((uint8_t *) &h->gb.buffer[get_bits_count(&h->gb) >> 3],
|
||||||
&h->gb.buffer[h->gb.size_in_bits >> 3], length - 1);
|
&h->gb.buffer[h->gb.size_in_bits >> 3], length - 1);
|
||||||
}
|
}
|
||||||
skip_bits_long(&h->gb, 0);
|
skip_bits_long(&h->gb, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user