aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mxpegdec.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-08-08 18:07:43 +0200
committerLuca Barbato <lu_zero@gentoo.org>2014-08-09 04:01:15 +0200
commit0ab76ddf313eeab70d06619ae0376fd7dd40761b (patch)
tree5b9cc612dea64c831a020c831ddd998c709cb796 /libavcodec/mxpegdec.c
parent042c25f54bd25b52d2936b822be026450971a82d (diff)
downloadffmpeg-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/mxpegdec.c')
-rw-r--r--libavcodec/mxpegdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index 6f0d0457f7..fff5c7eef9 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -249,7 +249,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
/* use stored SOF data to allocate current picture */
if (jpg->picture_ptr->data[0])
avctx->release_buffer(avctx, jpg->picture_ptr);
- if (avctx->get_buffer(avctx, jpg->picture_ptr) < 0) {
+ if (ff_get_buffer(avctx, jpg->picture_ptr) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return AVERROR(ENOMEM);
}
@@ -268,7 +268,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
/* allocate dummy reference picture if needed */
if (!reference_ptr->data[0] &&
- avctx->get_buffer(avctx, reference_ptr) < 0) {
+ ff_get_buffer(avctx, reference_ptr) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return AVERROR(ENOMEM);
}