[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:
Armin Novak
2026-02-17 12:05:42 +01:00
parent fac35c3abb
commit 118afc0b95
28 changed files with 154 additions and 105 deletions

View File

@@ -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);
}