diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-07 15:04:56 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-07 15:04:56 +0200 |
commit | 21d99be9dc00a03be94bbcc1be0a2ec6a83d9b4e (patch) | |
tree | d0b74bea0b49b6e4e9b6e115ca87f3ca10589584 /libavformat/utils.c | |
parent | 7b6b9be8614aa53e79db565c9203b9afaa452d8d (diff) | |
parent | c2a2ad133eb9d42361804a568dee336992349a5e (diff) | |
download | ffmpeg-21d99be9dc00a03be94bbcc1be0a2ec6a83d9b4e.tar.gz |
Merge branch 'release/0.8' into release/0.7
* release/0.8: (21 commits)
rtp: Fix integer underflow that could allow remote code execution.
cavsdec: avoid possible crash with crafted input
vf_scale: apply the same transform to the aspect during init that is applied per frame
Fix memory corruption in case of memory allocation failure in av_probe_input_buffer()
Make all option parsing functions match the function pointer type through which they are called.
mjpegdec; even better RSTn skiping Fixes Ticket426
jpegdec: better rst skiping Fixes Ticket426
mpeg4: fix another packed divx issue. Fixes getting_stuck.avi
mpeg4: adjust dummy frame threashold for packed divx. Fixes Ticket427
configure: add missing CFLAGS to fix building on the HURD
cavs: fix some crashes with invalid bitstreams
jpegdec: actually search for and parse RSTn
Fix compilation with --disable-avfilter. (cherry picked from commit 67a8251690a17f05630eb6f45a73db0f0e806c72)
libavfilter: fix --enable-small
0.8.2
cavs: fix oCERT #2011-002 FFmpeg/libavcodec insufficient boundary check
Fix possible crash when decoding mpeg streams.
Bink: clip AC coefficients during dequantization.
ffmpeg: fix passlogfile regression
Fix several security issues in matroskadec.c (MSVR-11-0080).
...
Conflicts:
Doxyfile
RELEASE
VERSION
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 662b49ae19..3414ce14f0 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -596,13 +596,19 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, probe_size = FFMIN(probe_size<<1, FFMAX(max_probe_size, probe_size+1))) { int ret, score = probe_size < max_probe_size ? AVPROBE_SCORE_MAX/4 : 0; int buf_offset = (probe_size == PROBE_BUF_MIN) ? 0 : probe_size>>1; + void *buftmp; if (probe_size < offset) { continue; } /* read probe data */ - buf = av_realloc(buf, probe_size + AVPROBE_PADDING_SIZE); + buftmp = av_realloc(buf, probe_size + AVPROBE_PADDING_SIZE); + if(!buftmp){ + av_free(buf); + return AVERROR(ENOMEM); + } + buf=buftmp; if ((ret = avio_read(pb, buf + buf_offset, probe_size - buf_offset)) < 0) { /* fail if error was not end of file, otherwise, lower score */ if (ret != AVERROR_EOF) { |