-
Alexandros Frantzis authored
This commit improves bound checking by more accurately calculating the expected transfer size. This improvement is achieved in two ways: 1. Using the image level (layer_)stride when the (layer_)stride is 0, which matches the interpretation we use for performing the actual read/write. 2. Calculating the transfer size by using the exact end offset in the image, instead of using multiples of whole image rows. The increased accuracy increases safety, and also allows us to support some transfers with explicit strides that were previously rejected (see added test). Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
0bb764b6