Commit 018ca26d authored by Thomas Daede's avatar Thomas Daede

CVE-2017-14160: fix bounds check on very low sample rates.

parent e74456ac
...@@ -602,8 +602,9 @@ static void bark_noise_hybridmp(int n,const long *b, ...@@ -602,8 +602,9 @@ static void bark_noise_hybridmp(int n,const long *b,
for (i = 0, x = 0.f;; i++, x += 1.f) { for (i = 0, x = 0.f;; i++, x += 1.f) {
lo = b[i] >> 16; lo = b[i] >> 16;
if( lo>=0 ) break;
hi = b[i] & 0xffff; hi = b[i] & 0xffff;
if( lo>=0 ) break;
if( hi>=n ) break;
tN = N[hi] + N[-lo]; tN = N[hi] + N[-lo];
tX = X[hi] - X[-lo]; tX = X[hi] - X[-lo];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment