Fixes: out of array access Fixes: tickets/10754/poc17ffmpeg Discovered by Zeng Yunxiang.
Unified · Split
| @@ -1212,7 +1212,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) · 1211 unmodified lines | |||
| 1212 | dst += INPLACE_OFFSET; | 1212 | dst += INPLACE_OFFSET; |
| 1213 | 1213 | ||
| 1214 | if (src_stride == dst_stride) | 1214 | if (src_stride == dst_stride) |
| 1215 | memcpy(dst, src, src_stride * h); | 1215 | memcpy(dst, src, src_stride * h - src_stride + w); |
| 1216 | else { | 1216 | else { |
| 1217 | int h2 = h; | 1217 | int h2 = h; |
| 1218 | uint8_t *dst2 = dst; | 1218 | uint8_t *dst2 = dst; |