Bug 516396: Back out the input length check for PR_strtod. We need more NSPR_4_7_BRANCH
authorwtc%google.com
Mon, 05 Oct 2009 23:05:25 +0000
branchNSPR_4_7_BRANCH
changeset 4166 29d0c65372a236e8f17a4ec6cd0ca618bfa339e2
parent 4162 ea08efa0779933bc97be73aab467c67f109ab909
child 4169 d5eb7503e5232182996570154a935f9a463cacf0
push idunknown
push userunknown
push dateunknown
bugs516396
Bug 516396: Back out the input length check for PR_strtod. We need more time to figure out how to check the input length correctly. Tag: NSPR_4_7_BRANCH
pr/src/misc/prdtoa.c
--- a/pr/src/misc/prdtoa.c
+++ b/pr/src/misc/prdtoa.c
@@ -1754,18 +1754,16 @@ PR_strtod
 					e = -e;
 				}
 			else
 				e = 0;
 			}
 		else
 			s = s00;
 		}
-	if (nd > 64 * 1024)
-		goto ret0;
 	if (!nd) {
 		if (!nz && !nz0) {
 #ifdef INFNAN_CHECK
 			/* Check for Nan and Infinity */
 			switch(c) {
 			  case 'i':
 			  case 'I':
 				if (match(&s,"nf")) {
@@ -1786,17 +1784,16 @@ PR_strtod
 					if (*s == '(') /*)*/
 						hexnan(&rv, &s);
 #endif
 					goto ret;
 					}
 			  }
 #endif /* INFNAN_CHECK */
  ret0:
-			PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
 			s = s00;
 			sign = 0;
 			}
 		goto ret;
 		}
 	e1 = e -= nf;
 
 	/* Now we have nd0 digits, starting at s0, followed by a