[PATCH 3/5] wined3d: Add support for buffers in wined3d_device_copy_sub_resource().

Henri Verbeet hverbeet at gmail.com
Sat Mar 19 04:15:14 CDT 2016


On 18 March 2016 at 12:30, Józef Kucia <jkucia at codeweavers.com> wrote:
> +        if (src_offset > src_resource->size
> +                || src_offset + size > src_resource->size
That's not a safe way to validate "size". For large enough values of
"size", "src_offset + size" may wrap to something smaller than
"src_resource->size". You'd typically do something like "size >
src_resource->size - src_offset" instead.



More information about the wine-devel mailing list