Skip to content

vrend: reject bad strides in check_iov_bounds

Chia-I Wu requested to merge olv/virglrenderer:virgl-copy-transfer-fix into master

Transfer strides are either set internally or coming from virgl_renderer_transfer_{write,read}_iov. As far as I can tell, Mesa always passes sane values. We also expect sane values in places like vrend_renderer_transfer_write_iov, vrend_transfer_send_readpixels, and vrend_transfer_send_getteximage already. Let's reject bad strides.

This fixes, for example, transfers to 1D array (thus box->height is

  1. with non-default stride.

Signed-off-by: Chia-I Wu olvaffe@gmail.com

CC @afrantzis @gurchetansingh

Merge request reports