mirror of https://github.com/mstorsjo/fdk-aac.git
Don't try to read a negative number of bits
Fixes: 1919/clusterfuzz-testcase-minimized-5021082513833984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
parent
4c4da0e39a
commit
21cb19455c
|
@ -498,7 +498,7 @@ ReadPsData (HANDLE_PS_DEC h_ps_d, /*!< handle to struct PS_DEC */
|
|||
h_ps_d->bPsDataAvail[h_ps_d->bsReadSlot] = ppt_none;
|
||||
/* discard all remaining bits */
|
||||
nBitsLeft -= startbits - FDKgetValidBits(hBitBuf);
|
||||
while (nBitsLeft) {
|
||||
while (nBitsLeft > 0) {
|
||||
int i = nBitsLeft;
|
||||
if (i>8) {
|
||||
i = 8;
|
||||
|
|
Loading…
Reference in New Issue