Blame SOURCES/audiofile-0.3.6-pull43.patch

852130
diff -Nur audiofile-0.3.6/libaudiofile/modules/IMA.cpp audiofile-0.3.6-pull43/libaudiofile/modules/IMA.cpp
852130
--- audiofile-0.3.6/libaudiofile/modules/IMA.cpp	2013-03-06 06:30:03.000000000 +0100
852130
+++ audiofile-0.3.6-pull43/libaudiofile/modules/IMA.cpp	2017-03-06 18:06:35.000000000 +0100
852130
@@ -169,7 +169,7 @@
852130
 		if (encoded[1] & 0x80)
852130
 			m_adpcmState[c].previousValue -= 0x10000;
852130
 
852130
-		m_adpcmState[c].index = encoded[2];
852130
+		m_adpcmState[c].index = clamp(encoded[2], 0, 88);
852130
 
852130
 		*decoded++ = m_adpcmState[c].previousValue;
852130
 
852130
@@ -210,7 +210,7 @@
852130
 			predictor -= 0x10000;
852130
 
852130
 		state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16);
852130
-		state.index = encoded[1] & 0x7f;
852130
+		state.index = clamp(encoded[1] & 0x7f, 0, 88);
852130
 		encoded += 2;
852130
 
852130
 		for (int n=0; n