[webkit-reviews] review granted: [Bug 9697] parseInt results may be inaccurate for numbers greater than 2^53 : [Attachment 15541] Revised proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 17 08:18:58 PDT 2007


Darin Adler <darin at apple.com> has granted Cameron Zwarich (cpst)
<cwzwarich at uwaterloo.ca>'s request for review:
Bug 9697: parseInt results may be inaccurate for numbers greater than 2^53
http://bugs.webkit.org/show_bug.cgi?id=9697

Attachment 15541: Revised proposed patch
http://bugs.webkit.org/attachment.cgi?id=15541&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
r=me

+    const char* p;
+    int digit;

I would have declared these where they are used rather than at the top of the
function.

+	     number = parseIntOverflow(s.substr(firstDigitPosition).ascii(), p
- firstDigitPosition, radix);

Could pass p - firstDigitPosition to substr too to make a smaller buffer.

+	   if (strncasecmp(c, "inf", 3) == 0)

This could use a comment like the one you wrote in this bug -- we shouldn't
leave something unclear and non-obvious like this behind for the future.



More information about the webkit-reviews mailing list