DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
# HG changeset patch
# Parent bfb616effc20e449c553b492876a9731352496f0
Bug 776661 - Initialize all of the bytes in the incoming data structure in silk_get_TOC; r=rillian

diff --git a/media/libopus/silk/dec_API.c b/media/libopus/silk/dec_API.c
--- a/media/libopus/silk/dec_API.c
+++ b/media/libopus/silk/dec_API.c
@@ -352,17 +352,17 @@ opus_int silk_get_TOC(
 
     if( nBytesIn < 1 ) {
         return -1;
     }
     if( nFramesPerPayload < 0 || nFramesPerPayload > 3 ) {
         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 );
 
     Silk_TOC->inbandFECFlag = flags & 1;
     for( i = nFramesPerPayload - 1; i >= 0 ; i-- ) {
         flags = silk_RSHIFT( flags, 1 );
         Silk_TOC->VADFlags[ i ] = flags & 1;