aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-01-08 17:19:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-08 18:04:36 +0100
commit5a98a000018e0563ddf3316d1594cc438b0c696e (patch)
tree1f799ae358f2755ee869b256a3a150cb71cb3a69 /ffmpeg.c
parentf04b323a460fd026d1cab31ad82464d34d5d2011 (diff)
downloadffmpeg-5a98a000018e0563ddf3316d1594cc438b0c696e.tar.gz
avcodec/dvdsubdec: fix accessing dangling pointers
dvdsub_decode() can call append_to_cached_buf() 2 times, the second time with ctx->buf as argument. If the second append_to_cached_buf() reallocs ctx->buf, the argument will be a pointer to the previous, freed block. This can cause invalid reads at least with some fuzzed files - and possibly with valid files. Since packets can apparently not be larger than 64K (even if packets are combined), just use a fixed size buffer. It will be allocated as part of the DVDSubContext, and although some memory is "wasted", it's relatively minimal by modern standards and should be acceptable. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 816577716bc6170bccfea3b9e865618b69a4b426) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
0 files changed, 0 insertions, 0 deletions