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

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

parent e74456ac
Loading
Loading
Loading
Loading
+2 −1
Changes for lib/psy.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -602,8 +602,9 @@ static void bark_noise_hybridmp(int n,const long *b,
  for (i = 0, x = 0.f;; i++, x += 1.f) {

    lo = b[i] >> 16;
    if( lo>=0 ) break;
    hi = b[i] & 0xffff;
    if( lo>=0 ) break;
    if( hi>=n ) break;

    tN = N[hi] + N[-lo];
    tX = X[hi] - X[-lo];