mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[nodiscard] Fix all winpr_RAND usages
* Check return value and act on it. * Initialize arrays that were missed before.
This commit is contained in:
@@ -328,7 +328,12 @@ fail:
|
||||
static BYTE prand(void)
|
||||
{
|
||||
BYTE tmp = 0;
|
||||
winpr_RAND(&tmp, sizeof(tmp));
|
||||
if (winpr_RAND(&tmp, sizeof(tmp)) < 0)
|
||||
{
|
||||
(void)fprintf(stderr, "winpr_RAND faild,retry...\n");
|
||||
// NOLINTNEXTLINE(concurrency-mt-unsafe)
|
||||
exit(-1);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user