shithub: opus

Download patch

ref: 5c3d155188366f02a1dd7ecdcb055ef7df4f20c0
parent: 03f7de77a4ac7a0e83ba99c0d1fdb111404f92ca
author: Gregory Maxwell <[email protected]>
date: Mon Aug 15 09:18:52 EDT 2011

In silk_dec_API.c a memcpy was blindly copying data of differing types (opus_int16[2] to opus_int[2]).

--- a/silk/silk_dec_API.c
+++ b/silk/silk_dec_API.c
@@ -210,7 +210,9 @@
         {
             silk_stereo_decode_pred( psRangeDec, &decode_only_middle, MS_pred_Q13 );
         } else {
-            SKP_memcpy( MS_pred_Q13, &psDec->sStereo.pred_prev_Q13, sizeof( MS_pred_Q13 ) );
+            for( n = 0; n < 2; n++ ) {
+                MS_pred_Q13[n] = psDec->sStereo.pred_prev_Q13[n];
+            }
         }
     }