Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-22 21:25:03 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-22 22:30:19 +0300
commit07e61f42120bb2154a88cc452b98969837fc3565 (patch)
tree7b98001dedd48cda94780cf695812a67ac79f8ed
parentca0d38395c50e2082124d95843e036d274401dd0 (diff)
Increase headroom to avoid overflow in silk_pitch_analysis_core()
-rw-r--r--silk/fixed/pitch_analysis_core_FIX.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/silk/fixed/pitch_analysis_core_FIX.c b/silk/fixed/pitch_analysis_core_FIX.c
index 7cd303d5..03ea28d0 100644
--- a/silk/fixed/pitch_analysis_core_FIX.c
+++ b/silk/fixed/pitch_analysis_core_FIX.c
@@ -141,7 +141,7 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0
/* Downscale input if necessary */
silk_sum_sqr_shift( &energy, &shift, frame_unscaled, frame_length );
- shift += 2 - silk_CLZ32( energy ); /* at least one bit headroom */
+ shift += 3 - silk_CLZ32( energy ); /* at least two bits headroom */
ALLOC( frame_scaled, frame_length, opus_int16 );
if( shift > 0 ) {
shift = silk_RSHIFT( shift + 1, 1 );