Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-08 16:45:18 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-08 16:54:53 +0400
commit02018a359e05ebca8ded672166b80dad47ab2de1 (patch)
tree5647522e2068d611532878570fd554e3aab926f8
parent451bc8ee2fceaf9a3290ed5a6c65b6734ab51b8c (diff)
parent146b187113e3cc20c2a97c5f264da13e701ca247 (diff)
Merge commit '146b187113e3cc20c2a97c5f264da13e701ca247' into release/1.1
* commit '146b187113e3cc20c2a97c5f264da13e701ca247': lavc: Check the image size before calling get_buffer Conflicts: libavcodec/utils.c See: 668494acd8b20f974c7722895d4a6a14c1005f1e Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6552b9ee8d..c25d6412c6 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -540,6 +540,11 @@ void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
{
+ if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
+ if (av_image_check_size(avctx->width, avctx->height, 0, avctx))
+ return AVERROR_INVALIDDATA;
+ }
+
ff_init_buffer_info(avctx, frame);
return avctx->get_buffer(avctx, frame);