wined3d: Prevent possible integer overflow in buffer_invalidate_bo_range().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
654337e14d
commit
446ee50b90
|
@ -47,7 +47,7 @@ static void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned i
|
|||
if (!offset && (!size || size == buffer->resource.size))
|
||||
goto invalidate_all;
|
||||
|
||||
if (offset > buffer->resource.size || offset + size > buffer->resource.size)
|
||||
if (offset > buffer->resource.size || size > buffer->resource.size - offset)
|
||||
{
|
||||
WARN("Invalid range specified, invalidating entire buffer.\n");
|
||||
goto invalidate_all;
|
||||
|
|
Loading…
Reference in New Issue