| Index: nss/lib/freebl/unix_rand.c
|
| ===================================================================
|
| --- nss/lib/freebl/unix_rand.c (revision 204056)
|
| +++ nss/lib/freebl/unix_rand.c (working copy)
|
| @@ -918,6 +918,16 @@
|
| || defined(HPUX)
|
| if (bytes)
|
| return;
|
| +
|
| + /*
|
| + * Modified to abort the process if it failed to read from /dev/urandom.
|
| + *
|
| + * See crbug.com/244661 for details.
|
| + */
|
| + fprintf(stderr, "[ERROR:%s(%d)] NSS failed to read from /dev/urandom. "
|
| + "Abort process.\n", __FILE__, __LINE__);
|
| + fflush(stderr);
|
| + abort();
|
| #endif
|
|
|
| #ifdef SOLARIS
|
| @@ -1132,7 +1142,15 @@
|
|
|
| file = fopen("/dev/urandom", "r");
|
| if (file == NULL) {
|
| - return rng_systemFromNoise(dest, maxLen);
|
| + /*
|
| + * Modified to abort the process if it failed to read from /dev/urandom.
|
| + *
|
| + * See crbug.com/244661 for details.
|
| + */
|
| + fprintf(stderr, "[ERROR:%s(%d)] NSS failed to read from /dev/urandom. "
|
| + "Abort process.\n", __FILE__, __LINE__);
|
| + fflush(stderr);
|
| + abort();
|
| }
|
| while (maxLen > fileBytes) {
|
| bytes = maxLen - fileBytes;
|
|
|