--- trunk/xvidcore/src/image/colorspace.c 2011/05/18 09:10:05 1988 +++ trunk/xvidcore/src/image/colorspace.c 2019/11/03 11:50:49 2177 @@ -102,6 +102,7 @@ int y_dif = y_stride - fixed_width; \ int uv_dif = uv_stride - (fixed_width / 2); \ int x, y; \ + if ((x_ptr == NULL) || (x_dif < 0)) return; \ if (vflip) { \ x_ptr += (height - 1) * x_stride; \ x_dif = -(SIZE)*fixed_width - x_stride; \