24 Feb
2026
24 Feb
'26
1:17 p.m.
Nikolay Sivov (@nsivov) commented about dlls/bcryptprimitives/main.c:
#include "windef.h" #include "winbase.h" #include "ntsecapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
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( "failed to generate random data\n" ); + abort(); + } Why would we ever want to abort here?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10174#note_130354