Fixed sizeof param in silk_get_TOC. Size for memset was calculated wrong.
authorCyril Lashkevich <notorca@gmail.com>
Mon, 6 Aug 2012 13:38:18 +0000 (16:38 +0300)
committerGregory Maxwell <greg@xiph.org>
Mon, 6 Aug 2012 16:29:42 +0000 (12:29 -0400)
Signed-off-by: Gregory Maxwell <greg@xiph.org>
silk_get_TOC is unused, unreachable, and not useful without some
packet pre-processing, but until we remove it it should be correct.
This was also reported by Mozilla.

silk/dec_API.c

index b5acb6b..2ca2451 100644 (file)
@@ -357,7 +357,7 @@ opus_int silk_get_TOC(
         return -1;
     }
 
-    silk_memset( Silk_TOC, 0, sizeof( Silk_TOC ) );
+    silk_memset( Silk_TOC, 0, sizeof( *Silk_TOC ) );
 
     /* For stereo, extract the flags for the mid channel */
     flags = silk_RSHIFT( payload[ 0 ], 7 - nFramesPerPayload ) & ( silk_LSHIFT( 1, nFramesPerPayload + 1 ) - 1 );