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

Unified Diff: patches/nss-urandom-abort.patch

Issue 105893015: Update third_party/nss to NSS 3.15.4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Remove SVN property on new file nss/lib/freebl/rsapkcs.c Created 6 years, 11 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
« no previous file with comments | « patches/nss-chacha20-poly1305.patch ('k') | scripts/nss-checkout.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: patches/nss-urandom-abort.patch
===================================================================
--- patches/nss-urandom-abort.patch (revision 239365)
+++ patches/nss-urandom-abort.patch (working copy)
@@ -1,7 +1,6 @@
-Index: unix_rand.c
-===================================================================
---- unix_rand.c (revision 203531)
-+++ unix_rand.c (working copy)
+diff -r c3565a90b8c4 lib/freebl/unix_rand.c
+--- a/lib/freebl/unix_rand.c Fri Jan 03 20:59:10 2014 +0100
++++ b/lib/freebl/unix_rand.c Tue Jan 07 11:28:59 2014 -0800
@@ -916,8 +916,19 @@
#if defined(BSDI) || defined(FREEBSD) || defined(NETBSD) \
|| defined(OPENBSD) || defined(DARWIN) || defined(LINUX) \
@@ -23,7 +22,7 @@
#endif
#ifdef SOLARIS
-@@ -1123,6 +1134,11 @@
+@@ -1134,6 +1145,11 @@
}
}
@@ -35,7 +34,7 @@
size_t RNG_SystemRNG(void *dest, size_t maxLen)
{
FILE *file;
-@@ -1132,7 +1148,10 @@
+@@ -1144,7 +1160,10 @@
file = fopen("/dev/urandom", "r");
if (file == NULL) {
@@ -45,9 +44,9 @@
+ fflush(stderr);
+ abort();
}
- while (maxLen > fileBytes) {
- bytes = maxLen - fileBytes;
-@@ -1144,8 +1163,10 @@
+ /* Read from the underlying file descriptor directly to bypass stdio
+ * buffering and avoid reading more bytes than we need from /dev/urandom.
+@@ -1164,8 +1183,10 @@
}
fclose(file);
if (fileBytes != maxLen) {
« no previous file with comments | « patches/nss-chacha20-poly1305.patch ('k') | scripts/nss-checkout.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698