PR: 2372
authorDr. Stephen Henson <steve@openssl.org>
Thu, 18 Nov 2010 12:28:57 +0000 (12:28 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 18 Nov 2010 12:28:57 +0000 (12:28 +0000)
Submitted by: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl>
Reviewed by: steve

Fix OpenBSD compilation failure.

crypto/rand/randfile.c

index 678b0fe0d65e5524df0209714b20a245894b4965..f9b709e6d53f300a74e82f3776f57e68d80a863c 100644 (file)
@@ -310,7 +310,7 @@ const char *RAND_file_name(char *buf, size_t size)
         * to something hopefully decent if that isn't available. 
         */
 
-       if (!ok)
+       if (!buf[0])
                if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) {
                        return(NULL);
                }