Bug 1332953 - Update libopus to 1.1.4. r=kinetik
authorRalph Giles <giles@mozilla.com>
Tue, 14 Feb 2017 11:03:07 -0800
changeset 371879 4b5f50f51228296629c5dd2b6950439c5d2d349d
parent 371878 70026b13140b496538e032d9c71824201ff857e9
child 371880 6a3ba8bfb34cb54a4377067bd5bf4e75c2c7526d
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1332953
milestone54.0a1
Bug 1332953 - Update libopus to 1.1.4. r=kinetik This fixes a wrap-around issue in SILK LSF stabilization code, addressing CVE-2017-0381. MozReview-Commit-ID: 7yCUoSKNOcl
media/libopus/README_MOZILLA
media/libopus/moz.build
media/libopus/silk/NLSF_stabilize.c
--- a/media/libopus/README_MOZILLA
+++ b/media/libopus/README_MOZILLA
@@ -3,9 +3,9 @@ IETF Opus audio codec reference implemen
 The source in this directory was copied from an opus
 repository checkout by running the ./update.sh script.
 Any changes made to this version of the source should
 be reflected in that script, e.g. by applying patch
 files after the copy step.
 
 The upstream repository is https://git.xiph.org/opus.git
 
-The git tag/revision used was v1.1.3.
+The git tag/revision used was v1.1.4.
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -15,17 +15,17 @@ EXPORTS.opus += [
 ]
 
 # We allow warnings for third-party code that can be updated from upstream.
 ALLOW_COMPILER_WARNINGS = True
 
 FINAL_LIBRARY = 'gkmedias'
 
 DEFINES['OPUS_BUILD'] = True
-DEFINES['OPUS_VERSION'] = '"v1.1.3-mozilla"'
+DEFINES['OPUS_VERSION'] = '"v1.1.4-mozilla"'
 DEFINES['USE_ALLOCA'] = True
 
 # Don't export symbols
 DEFINES['OPUS_EXPORT'] = ''
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
     DEFINES['OPUS_ARM_ASM'] = True
     DEFINES['OPUS_ARM_EXTERNAL_ASM'] = True
--- a/media/libopus/silk/NLSF_stabilize.c
+++ b/media/libopus/silk/NLSF_stabilize.c
@@ -125,17 +125,17 @@ void silk_NLSF_stabilize(
         /* Worst case: O(n^2) for an inversely sorted array          */
         silk_insertion_sort_increasing_all_values_int16( &NLSF_Q15[0], L );
 
         /* First NLSF should be no less than NDeltaMin[0] */
         NLSF_Q15[0] = silk_max_int( NLSF_Q15[0], NDeltaMin_Q15[0] );
 
         /* Keep delta_min distance between the NLSFs */
         for( i = 1; i < L; i++ )
-            NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], NLSF_Q15[i-1] + NDeltaMin_Q15[i] );
+            NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], silk_ADD_SAT16( NLSF_Q15[i-1], NDeltaMin_Q15[i] ) );
 
         /* Last NLSF should be no higher than 1 - NDeltaMin[L] */
         NLSF_Q15[L-1] = silk_min_int( NLSF_Q15[L-1], (1<<15) - NDeltaMin_Q15[L] );
 
         /* Keep NDeltaMin distance between the NLSFs */
         for( i = L-2; i >= 0; i-- )
             NLSF_Q15[i] = silk_min_int( NLSF_Q15[i], NLSF_Q15[i+1] - NDeltaMin_Q15[i+1] );
     }