svq3: use memmove to avoid overlap in memcpy.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 4c8ce750abaa783109630d41ca7dde5de34f6197) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ab38b39059
commit
a92b73da99
@ -790,8 +790,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…
x
Reference in New Issue
Block a user