diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 84f91fc135..fafe5f52d7 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -355,38 +355,45 @@ void ff_emulated_edge_mc(uint8_t *buf, const uint8_t *src, int linesize, int blo start_x= FFMAX(0, -src_x); end_y= FFMIN(block_h, h-src_y); end_x= FFMIN(block_w, w-src_x); + assert(start_y < end_y && block_h); + assert(start_x < end_x && block_w); - // copy existing part - for(y=start_y; y