24 Feb
2026
24 Feb
'26
4:35 a.m.
Hans Leidekker (@hans) commented about dlls/bcryptprimitives/main.c:
+#include <stdlib.h> + #include "windef.h" #include "winbase.h" #include "ntsecapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(bcryptprim);
BOOL WINAPI ProcessPrng(BYTE *data, SIZE_T size) { - return RtlGenRandom(data, size); + if (!RtlGenRandom( data, size )) + { + /* ProcessPrng is documented as always returning TRUE so abort the process if it fails */ + ERR("ProcessPrng failed to generate random data\n"); No need to include the function name, it's added by the ERR() macro.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10174#note_130336