diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-05-09 17:14:10 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-05-09 17:14:10 -0700 |
commit | 57d474b424be58783e7abba469d2f3d800094967 (patch) | |
tree | 756d84f186478676d172f1afc3339c05c6b69709 /libSBRdec | |
parent | 259a3c5bd5eb9be666f40dfb2978502533dd2b82 (diff) | |
parent | 44ac411683e7cfbfdb1f58e02d54377d709c8dd4 (diff) | |
download | fdk-aac-57d474b424be58783e7abba469d2f3d800094967.tar.gz fdk-aac-57d474b424be58783e7abba469d2f3d800094967.tar.bz2 fdk-aac-57d474b424be58783e7abba469d2f3d800094967.zip |
FDK patches: fix overflows in decoder out-of-band config
am: 44ac411683
Change-Id: I8b82f2a074eac9906d6e7badaf1cbb449ad13bdf
Diffstat (limited to 'libSBRdec')
-rw-r--r-- | libSBRdec/src/psbitdec.cpp | 4 |
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) { |