diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-17 16:16:39 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-17 16:16:39 +0200 |
commit | 757e43c3f863453e5d17e4201c7c9ae2a58c5844 (patch) | |
tree | 81b6481f0df577dbacfb6b9feca2fca377e912d8 /fmt-conversion.h | |
parent | e342a81d6f5d13b83753050af79feab4fd702925 (diff) | |
download | mpv-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 'fmt-conversion.h')
0 files changed, 0 insertions, 0 deletions