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:
@@ -894,10 +894,8 @@ static BOOL xf_event_ConfigureNotify(xfContext* xfc, const XConfigureEvent* even
|
||||
|
||||
if (freerdp_settings_get_bool(settings, FreeRDP_DynamicResolutionUpdate))
|
||||
{
|
||||
int alignedWidth = 0;
|
||||
int alignedHeight = 0;
|
||||
alignedWidth = (xfc->window->width / 2) * 2;
|
||||
alignedHeight = (xfc->window->height / 2) * 2;
|
||||
const int alignedWidth = (xfc->window->width / 2) * 2;
|
||||
const int alignedHeight = (xfc->window->height / 2) * 2;
|
||||
/* ask the server to resize using the display channel */
|
||||
xf_disp_handle_configureNotify(xfc, alignedWidth, alignedHeight);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user