avcodec/libfdk-aacdec: Correct buffer_size parameter
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 25 May 2017 01:21:50 +0000 (03:21 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 5 Jun 2017 21:16:54 +0000 (23:16 +0200)
commit8fbe1f634fdf9920492be10f078c0a49a17f7f14
tree509d9dc55ffeb4357b724ec5692023e26a77539c
parent492099f9c49cebac989bfd7696a757ff6afe36c4
avcodec/libfdk-aacdec: Correct buffer_size parameter

the timeDataSize argument to aacDecoder_DecodeFrame() seems undocumented and until
2016 04 (203e3f28fbebec7011342017fafc2a0bda0ce530) 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 commit ca6776a993903dbcfef5ae8a18556c40ecf83e1c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/libfdk-aacdec.c