the timeDataSize argument to aacDecoder_DecodeFrame() seems undocumented and until 2016 04 (tags/n3.0.9203e3f28fb) unused. after that commit libfdk-aacdec interprets it as size in sample units and memsets that on error. FFmpeg as well as others (like GStreamer) did interpret it as size in bytes Fixes: 1442/clusterfuzz-testcase-minimized-4540199973421056 (This requires recent libfdk to reproduce) Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commitca6776a993) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>