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

Unified Diff: nspr/pr/src/misc/prinit.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years 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: nspr/pr/src/misc/prinit.c
diff --git a/nspr/pr/src/misc/prinit.c b/nspr/pr/src/misc/prinit.c
index 5eda4a2aaba6ef751208dab0cbc03bdabc7cac59..43048a0d2da03745c0e8256678e76a7b9125e130 100644
--- a/nspr/pr/src/misc/prinit.c
+++ b/nspr/pr/src/misc/prinit.c
@@ -642,7 +642,10 @@ PR_IMPLEMENT(PRFileDesc *) PR_GetInheritedFD(
while (1) {
if ((ptr[len] == ':') && (strncmp(ptr, name, len) == 0)) {
ptr += len + 1;
- PR_sscanf(ptr, "%d:0x%" PR_SCNxOSFD, &fileType, &osfd);
+ if (PR_sscanf(ptr, "%d:0x%" PR_SCNxOSFD, &fileType, &osfd) != 2) {
+ PR_SetError(PR_UNKNOWN_ERROR, 0);
+ return NULL;
+ }
switch ((PRDescType)fileType) {
case PR_DESC_FILE:
fd = PR_ImportFile(osfd);

Powered by Google App Engine
This is Rietveld 408576698