mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 01:00:10 +01:00
clover: Use cl_ulong in the maximum allocation size calculation to avoid overflow.
This commit is contained in:
parent
8c4a9f631d
commit
e457aca7fa
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ clCreateBuffer(cl_context d_ctx, cl_mem_flags flags, size_t size,
|
|||
throw error(CL_INVALID_HOST_PTR);
|
||||
|
||||
if (!size ||
|
||||
size > fold(maximum(), 0u,
|
||||
size > fold(maximum(), cl_ulong(0),
|
||||
map(std::mem_fn(&device::max_mem_alloc_size), ctx.devs())
|
||||
))
|
||||
throw error(CL_INVALID_BUFFER_SIZE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue