[asterisk-commits] rmudgett: trunk r373656 - in /trunk: ./ codecs/ilbc/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 25 12:22:28 CDT 2012


Author: rmudgett
Date: Tue Sep 25 12:22:25 2012
New Revision: 373656

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373656
Log:
Fix valgrind found memcpy issues in codec_ilbc.

Valgrind found codec_ilbc using memcpy instead of memmove for overlapping
memory blocks.

(issue ASTERISK-19890)
(closes issue ASTERISK-20231)
Reported by: Walter Doekes
Patches:
      ASTERISK-20231.patch (license #5674) patch uploaded by Walter Doekes
........

Merged revisions 373640 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373645 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373650 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/codecs/ilbc/iLBC_decode.c
    trunk/codecs/ilbc/iLBC_encode.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/codecs/ilbc/iLBC_decode.c
URL: http://svnview.digium.com/svn/asterisk/trunk/codecs/ilbc/iLBC_decode.c?view=diff&rev=373656&r1=373655&r2=373656
==============================================================================
--- trunk/codecs/ilbc/iLBC_decode.c (original)
+++ trunk/codecs/ilbc/iLBC_decode.c Tue Sep 25 12:22:25 2012
@@ -251,7 +251,7 @@
 
                /* update memory */
 
-               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
                memcpy(mem+CB_MEML-SUBL,
 
 
@@ -299,7 +299,7 @@
 
                /* update memory */
 
-               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
                memcpy(mem+CB_MEML-SUBL,
                    &reverseDecresidual[subframe*SUBL],
                    SUBL*sizeof(float));

Modified: trunk/codecs/ilbc/iLBC_encode.c
URL: http://svnview.digium.com/svn/asterisk/trunk/codecs/ilbc/iLBC_encode.c?view=diff&rev=373656&r1=373655&r2=373656
==============================================================================
--- trunk/codecs/ilbc/iLBC_encode.c (original)
+++ trunk/codecs/ilbc/iLBC_encode.c Tue Sep 25 12:22:25 2012
@@ -308,7 +308,7 @@
 
                /* update memory */
 
-               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
                memcpy(mem+CB_MEML-SUBL,
 
 
@@ -386,7 +386,7 @@
 
                /* update memory */
 
-               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memmove(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
                memcpy(mem+CB_MEML-SUBL,
                    &reverseDecresidual[subframe*SUBL],
                    SUBL*sizeof(float));




More information about the asterisk-commits mailing list