mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 11:00:08 +01:00
mmvideo/mm_decode_intra: check horizontal coordinate too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ae2132ac90)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -104,6 +104,9 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
|
|||||||
if (half_horiz)
|
if (half_horiz)
|
||||||
run_length *=2;
|
run_length *=2;
|
||||||
|
|
||||||
|
if (run_length > s->avctx->width - x)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (color) {
|
if (color) {
|
||||||
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
|
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
|
||||||
if (half_vert)
|
if (half_vert)
|
||||||
|
|||||||
Reference in New Issue
Block a user