[FFmpeg-cvslog] mmvideo/mm_decode_intra: check horizontal coordinate too
Michael Niedermayer
git at videolan.org
Mon May 13 00:52:32 CEST 2013
ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Thu May 2 22:06:03 2013 +0200| [e4bae0a140677869ffad76fd742d6f4ecbd57b2c] | committer: Michael Niedermayer
mmvideo/mm_decode_intra: check horizontal coordinate too
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit ae2132ac90f02330b0988e6e26ee0d53e41cd196)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4bae0a140677869ffad76fd742d6f4ecbd57b2c
---
libavcodec/mmvideo.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 4214eeb..b74424c 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)
More information about the ffmpeg-cvslog
mailing list