summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-17 16:16:39 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-17 16:16:39 +0200
commit757e43c3f863453e5d17e4201c7c9ae2a58c5844 (patch)
tree81b6481f0df577dbacfb6b9feca2fca377e912d8 /mplayer.c
parente342a81d6f5d13b83753050af79feab4fd702925 (diff)
downloadmpv-757e43c3f863453e5d17e4201c7c9ae2a58c5844.tar.bz2
mpv-757e43c3f863453e5d17e4201c7c9ae2a58c5844.tar.xz
demux: add sanity checks to packet allocation functions
Change new_demux_packet() and resize_demux_packet() length parameter type from int to size_t and add a check to abort() if the size is over 1 GB. This should make integer overflow problems leading to memory corruption in demuxers less likely; and aborting should be no worse than insane memory consumption. Also make the functions abort() if the actual allocation fails instead of trying to continue with a zero-sized buffer.
Diffstat (limited to 'mplayer.c')
0 files changed, 0 insertions, 0 deletions