aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec/src
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-05-09 17:26:58 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-09 17:26:58 -0700
commit3727e8927f02558b21317ab8291727372ea0beb7 (patch)
tree756d84f186478676d172f1afc3339c05c6b69709 /libSBRdec/src
parentb2ce5c82bd4288b0e55d23f8cbf1d51150d752fc (diff)
parent57d474b424be58783e7abba469d2f3d800094967 (diff)
downloadfdk-aac-3727e8927f02558b21317ab8291727372ea0beb7.tar.gz
fdk-aac-3727e8927f02558b21317ab8291727372ea0beb7.tar.bz2
fdk-aac-3727e8927f02558b21317ab8291727372ea0beb7.zip
FDK patches: fix overflows in decoder out-of-band config am: 44ac411683
am: 57d474b424 Change-Id: I88183937af5edfb0430f64618b8c25f066f698de
Diffstat (limited to 'libSBRdec/src')
-rw-r--r--libSBRdec/src/psbitdec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libSBRdec/src/psbitdec.cpp b/libSBRdec/src/psbitdec.cpp
index b2ea2e9..1521178 100644
--- a/libSBRdec/src/psbitdec.cpp
+++ b/libSBRdec/src/psbitdec.cpp
@@ -496,7 +496,7 @@ unsigned int ReadPsData(
/* no useful PS data could be read from bitstream */
h_ps_d->bPsDataAvail[h_ps_d->bsReadSlot] = ppt_none;
/* discard all remaining bits */
- nBitsLeft -= startbits - FDKgetValidBits(hBitBuf);
+ nBitsLeft -= startbits - (INT)FDKgetValidBits(hBitBuf);
while (nBitsLeft > 0) {
int i = nBitsLeft;
if (i > 8) {
@@ -505,7 +505,7 @@ unsigned int ReadPsData(
FDKreadBits(hBitBuf, i);
nBitsLeft -= i;
}
- return (startbits - FDKgetValidBits(hBitBuf));
+ return (UINT)(startbits - (INT)FDKgetValidBits(hBitBuf));
}
if (pBsData->modeIid > 2) {