Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1250)

Unified Diff: nss/lib/freebl/unix_rand.c

Issue 1843333003: Update NSPR to 4.12 and NSS to 3.23 on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/lib/freebl/unix_rand.c
diff --git a/nss/lib/freebl/unix_rand.c b/nss/lib/freebl/unix_rand.c
index 2f9b3e540de5758c0364cd4ab7c6713b06a55374..e0d8f58732e53087325b12a67dd905b7bfe538e6 100644
--- a/nss/lib/freebl/unix_rand.c
+++ b/nss/lib/freebl/unix_rand.c
@@ -17,6 +17,7 @@
#include "prerror.h"
#include "prthread.h"
#include "prprf.h"
+#include "prenv.h"
size_t RNG_FileUpdate(const char *fileName, size_t limit);
@@ -888,9 +889,9 @@ void RNG_SystemInfoForRNG(void)
bytes = RNG_FileUpdate("/dev/urandom", SYSTEM_RNG_SEED_COUNT);
/* If the user points us to a random file, pass it through the rng */
- randfile = getenv("NSRANDFILE");
+ randfile = PR_GetEnvSecure("NSRANDFILE");
if ( ( randfile != NULL ) && ( randfile[0] != '\0') ) {
- char *randCountString = getenv("NSRANDCOUNT");
+ char *randCountString = PR_GetEnvSecure("NSRANDCOUNT");
int randCount = randCountString ? atoi(randCountString) : 0;
if (randCount != 0) {
RNG_FileUpdate(randfile, randCount);
@@ -1086,7 +1087,7 @@ int ReadOneFile(int fileToRead)
int i, error = -1;
if (fd == NULL) {
- dir = getenv("HOME");
+ dir = PR_GetEnvSecure("HOME");
if (dir) {
fd = opendir(dir);
}

Powered by Google App Engine
This is Rietveld 408576698