mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[allocations] fix growth of preallocated buffers
* Replace * 2 with * sizeof(WCHAR) for string usages * Grow streams and other buffers reasonably, e.g. add 128 elements per try and check for possible overflows * Add constant postfix to force them to 64bit
This commit is contained in:
@@ -313,7 +313,7 @@ static inline char* base64_encode_ex(const BYTE* WINPR_RESTRICT alphabet,
|
||||
if (crLf)
|
||||
{
|
||||
size_t nCrLf = (outLen + lineSize - 1) / lineSize;
|
||||
extra = nCrLf * 2;
|
||||
extra = nCrLf * 2ull;
|
||||
}
|
||||
size_t outCounter = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user