diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-02 22:06:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-14 01:29:11 +0200 |
commit | 1d285db8a3a85fb5eadd28640eb121684d7f6463 (patch) | |
tree | a850f2ed75b50a0fcc233767f364ef2bf2628a8e | |
parent | cd24fdad470724651f6d5506ef94da92106ac6d3 (diff) | |
download | ffmpeg-1d285db8a3a85fb5eadd28640eb121684d7f6463.tar.gz |
mmvideo/mm_decode_intra: check horizontal coordinate too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ae2132ac90f02330b0988e6e26ee0d53e41cd196)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mmvideo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index aebfe265e3..40892a7c4c 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) |