aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec/src
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-08-15 16:36:05 +0300
committerMartin Storsjo <martin@martin.st>2017-08-15 23:12:51 +0300
commit1244b257ee7ec7d56f021a5c2e39e2c04881a148 (patch)
treeacaa570054e9b7bf4b32ca86f5ad4fe10e041087 /libMpegTPDec/src
parent393a86c0dbffdf741e44b84e6a88eb1c2138073d (diff)
downloadfdk-aac-1244b257ee7ec7d56f021a5c2e39e2c04881a148.tar.gz
fdk-aac-1244b257ee7ec7d56f021a5c2e39e2c04881a148.tar.bz2
fdk-aac-1244b257ee7ec7d56f021a5c2e39e2c04881a148.zip
Always feed more input data when possible for ADTS
This fixes cases where an ADTS header could set numberOfRawDataBlocks to a number larger than 1, which would lead to transportDec_FillData not feeding any more data, even though the input buffer was depleted. Fixes: 3014/clusterfuzz-testcase-5425740193464320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Diffstat (limited to 'libMpegTPDec/src')
-rw-r--r--libMpegTPDec/src/tpdec_lib.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp
index 24f755b..09f0703 100644
--- a/libMpegTPDec/src/tpdec_lib.cpp
+++ b/libMpegTPDec/src/tpdec_lib.cpp
@@ -342,9 +342,7 @@ TRANSPORTDEC_ERROR transportDec_FillData(
}
} else {
/* ... else feed bitbuffer with new stream data (append). */
- if (hTp->numberOfRawDataBlocks <= 0) {
- FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid) ;
- }
+ FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid);
}
return TRANSPORTDEC_OK;