]> granicus.if.org Git - php/commitdiff
Different error message if makedev check fails
authorScott <scott@paragonie.com>
Mon, 21 Sep 2015 15:51:16 +0000 (11:51 -0400)
committerAnatol Belski <ab@php.net>
Tue, 29 Sep 2015 07:14:29 +0000 (09:14 +0200)
ext/standard/random.c

index 6bee9d31d5151433d255b202ceb9ad3bdb7436b8..cad4d0acbfcbc5f92ab863d6c28314f2f07033f1 100644 (file)
@@ -149,7 +149,7 @@ static int php_random_bytes(void *bytes, size_t size)
                // Make sure that /dev/urandom is the proper urandom device on Linux
                if (st.st_rdev != makedev(1, 9)) {
                        close(fd);
-                       zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
+                       zend_throw_exception(zend_ce_exception, "Entropy source device is invalid", 0);
                        return FAILURE;
                }
 #endif