Commit 4c8ce750 authored by Michael Niedermayer's avatar Michael Niedermayer

svq3: use memmove to avoid overlap in memcpy.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 212960ee
...@@ -792,8 +792,8 @@ static int svq3_decode_slice_header(AVCodecContext *avctx) ...@@ -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);
} }
......
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