mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 03:44:06 +08:00
[uwac] fix wrong data type
This commit is contained in:
parent
fbc0d161ca
commit
e71da381cc
@ -328,13 +328,14 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int64_t nbuffers, int64_t allocSize
|
||||
return UWAC_ERROR_NOMEMORY;
|
||||
|
||||
/* round up to a multiple of PAGESIZE to page align data for each buffer */
|
||||
UINT64 test = (0ull + allocSize + pagesize - 1ull) & ~(pagesize - 1);
|
||||
uint64_t test = (0ull + allocSize + pagesize - 1ull) & ~(pagesize - 1);
|
||||
if (test > INT64_MAX)
|
||||
return UWAC_ERROR_NOMEMORY;
|
||||
|
||||
allocSize = (int64_t)test;
|
||||
|
||||
UwacBuffer* newBuffers = xrealloc(w->buffers, (w->nbuffers + nbuffers) * sizeof(UwacBuffer));
|
||||
UwacBuffer* newBuffers =
|
||||
xrealloc(w->buffers, (0ull + w->nbuffers + nbuffers) * sizeof(UwacBuffer));
|
||||
|
||||
if (!newBuffers)
|
||||
return UWAC_ERROR_NOMEMORY;
|
||||
|
Loading…
Reference in New Issue
Block a user