[FFmpeg-devel] [PATCH] aac: buffer overread checks

Alex Converse alex.converse
Mon Feb 15 16:30:38 CET 2010

Right now the AAC decoder is very prone to segfaulting due to buffer
overreads on thrashed streams. The attached patch adds buffer checks
after every syntax element and before large jumps forward in the PCE,
DSE, and FIL elements. This does not solve all the AAC buffer issues.
Zero sized codebook sections remain problematic and we still need more
padding possibly with even more invasive checks. Even so this patch
prevents the crash associated with the file attached to issue 1295 on
my system. (Valgrind still reports overreads but the file no longer
segfaults.) In general I think this patch will prevent many crashes
due to random stream corruption and mangled frames coming from bad
demuxers (I'm looking at you gstreamer.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aac-oob.diff
Type: text/x-patch
Size: 3071 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100215/d0a8348f/attachment.bin>

More information about the ffmpeg-devel mailing list