diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-18 19:54:54 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-18 19:56:45 +0400 |
commit | 4c8ce750abaa783109630d41ca7dde5de34f6197 (patch) | |
tree | e06632f4dd84a1b5233551fd376865413e8bfe1a /libavcodec/svq3.c | |
parent | 212960eea4c009e63eecc9386ea3af36c9f57780 (diff) |
svq3: use memmove to avoid overlap in memcpy.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 53c4d3202c..f584f3a2c6 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -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); } |