aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/rand/rand_os2.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-04-20 22:51:55 +0200
committermarha <marha@users.sourceforge.net>2015-04-20 22:53:07 +0200
commit2a00e489122f6c4b525090dbdba2855a2ea2d519 (patch)
tree815e5c842bccb2bc6eb4b2934ef618fe32b820ca /openssl/crypto/rand/rand_os2.c
parent4ba9be2882d9f1567809edb0a31fcdf11320d41f (diff)
downloadvcxsrv-2a00e489122f6c4b525090dbdba2855a2ea2d519.tar.gz
vcxsrv-2a00e489122f6c4b525090dbdba2855a2ea2d519.tar.bz2
vcxsrv-2a00e489122f6c4b525090dbdba2855a2ea2d519.zip
Upgraded to openssl 1.0.2a
Diffstat (limited to 'openssl/crypto/rand/rand_os2.c')
-rw-r--r--openssl/crypto/rand/rand_os2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openssl/crypto/rand/rand_os2.c b/openssl/crypto/rand/rand_os2.c
index 9c4a137bb..02148d5bf 100644
--- a/openssl/crypto/rand/rand_os2.c
+++ b/openssl/crypto/rand/rand_os2.c
@@ -149,6 +149,9 @@ int RAND_poll(void)
if (DosQuerySysState) {
char *buffer = OPENSSL_malloc(256 * 1024);
+ if(!buffer)
+ return 0;
+
if (DosQuerySysState(0x1F, 0, 0, 0, buffer, 256 * 1024) == 0) {
/*
* First 4 bytes in buffer is a pointer to the thread count there