aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-09-20 01:44:22 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-09-20 01:44:22 -0400
commitae5f5cc1c5d9919cc66efec2eea97f673228da44 (patch)
tree8c4b01d2fb6f4a5b5cc291c1fb91fd4cecaa97e6 /src
parent8ac5d8991888704e8f75401d1c36ab94ee597ea8 (diff)
downloadlibopus-ae5f5cc1c5d9919cc66efec2eea97f673228da44.tar.gz
Using OPUS_MOVE() instead of OPUS_COPY() to move redundancy bytes
memcpy() aliasing bug caught by Felicia's encoder fuzzing test
Diffstat (limited to 'src')
-rw-r--r--src/opus_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index 40440100..0b666469 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -2196,7 +2196,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
/* Put CELT->SILK redundancy data in the right place. */
if (redundancy && celt_to_silk && st->mode==MODE_HYBRID && st->use_vbr)
{
- OPUS_COPY(data+ret, data+nb_compr_bytes, redundancy_bytes);
+ OPUS_MOVE(data+ret, data+nb_compr_bytes, redundancy_bytes);
nb_compr_bytes = nb_compr_bytes+redundancy_bytes;
}
}