Hi, On 19 July 2017 at 11:25, Gwan-gyeong Mun <elong...@gmail.com> wrote: > [...] > And it adds limits of the height and the width on the copy region. > > [...] > @@ -534,14 +560,32 @@ swrast_put_image2(__DRIdrawable *driDrawable, > + if (height > dri2_surf->base.Height - y) > + height = dri2_surf->base.Height - y; > + > + if (width_bytes > internal_stride - x_bytes) > + width_bytes = internal_stride - x_bytes;
This all seems quite odd. Have you observed out-of-bounds co-ordinates in practice? If so, we should fix them at a higher layer, rather than silently quashing them down here. We can also check (x+width) against bo->base.width, and (y+height) against bo->base.height, rather than using bytes as a unit. But it would be good to understand where the real problem comes from first. The rest is a good fix though, thankyou! Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev