[nodiscard] Fix all winpr_RAND usages

* Check return value and act on it.
* Initialize arrays that were missed before.
This commit is contained in:
Armin Novak
2026-02-27 07:33:51 +01:00
parent 56d4139e6d
commit 89ab3c6c1b
50 changed files with 378 additions and 190 deletions

View File

@@ -343,7 +343,8 @@ proxyData* proxy_data_new(void)
if (!(pdata->gfx_server_ready = CreateEvent(nullptr, TRUE, FALSE, nullptr)))
goto error;
winpr_RAND(&temp, 16);
if (winpr_RAND(&temp, 16) < 0)
goto error;
hex = winpr_BinToHexString(temp, 16, FALSE);
if (!hex)
goto error;