diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-08-08 18:07:43 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-08-09 04:01:15 +0200 |
commit | 0ab76ddf313eeab70d06619ae0376fd7dd40761b (patch) | |
tree | 5b9cc612dea64c831a020c831ddd998c709cb796 /libavcodec/vorbisdec.c | |
parent | 042c25f54bd25b52d2936b822be026450971a82d (diff) | |
download | ffmpeg-0ab76ddf313eeab70d06619ae0376fd7dd40761b.tar.gz |
avcodec: Introduce ff_get_buffer
Validate the image size there as is done in the other release
branches.
Bug-Id: CVE-2011-3935
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r-- | libavcodec/vorbisdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 5a0a4a4a9b..a22b541b11 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -27,6 +27,7 @@ #define BITSTREAM_READER_LE #include "avcodec.h" +#include "internal.h" #include "get_bits.h" #include "dsputil.h" #include "fft.h" @@ -1668,7 +1669,7 @@ static int vorbis_decode_frame(AVCodecContext *avccontext, void *data, /* get output buffer */ vc->frame.nb_samples = len; - if ((ret = avccontext->get_buffer(avccontext, &vc->frame)) < 0) { + if ((ret = ff_get_buffer(avccontext, &vc->frame)) < 0) { av_log(avccontext, AV_LOG_ERROR, "get_buffer() failed\n"); return ret; } |