[FFmpeg-cvslog] svq3: use memmove to avoid overlap in memcpy.
Michael Niedermayer
git at videolan.org
Thu Apr 18 18:05:01 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Apr 18 17:54:54 2013 +0200| [4c8ce750abaa783109630d41ca7dde5de34f6197] | committer: Michael Niedermayer
svq3: use memmove to avoid overlap in memcpy.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c8ce750abaa783109630d41ca7dde5de34f6197
---
libavcodec/svq3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 53c4d32..f584f3a 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);
}
More information about the ffmpeg-cvslog
mailing list