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>2013-05-03 00:06:03 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-05-03 00:12:19 +0400
commitae2132ac90f02330b0988e6e26ee0d53e41cd196 (patch)
tree06bab661fbc06de92d8ffc7a58e46aef41d39180 /libavcodec/mmvideo.c
parent8d3c99e825317b7efda5fd12e69896b47c700303 (diff)
mmvideo/mm_decode_intra: check horizontal coordinate too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mmvideo.c')
-rw-r--r--libavcodec/mmvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 36dc9f9d8a..292ebe68b9 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -104,6 +104,9 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
if (half_horiz)
run_length *=2;
+ if (run_length > s->avctx->width - x)
+ return AVERROR_INVALIDDATA;
+
if (color) {
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
if (half_vert)