mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/mpegvideo_enc: Dont copy beyond the image
Fixes: out of array access Fixes: tickets/10754/poc17ffmpeg Discovered by Zeng Yunxiang. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a066b8a809fa6d8b31398d41787822803f8762f2) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fd3f7522a2
commit
c47825e94f
@ -1349,7 +1349,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
|
||||
dst += INPLACE_OFFSET;
|
||||
|
||||
if (src_stride == dst_stride)
|
||||
memcpy(dst, src, src_stride * h);
|
||||
memcpy(dst, src, src_stride * h - src_stride + w);
|
||||
else {
|
||||
int h2 = h;
|
||||
uint8_t *dst2 = dst;
|
||||
|
Loading…
x
Reference in New Issue
Block a user