[Webkit-unassigned] [Bug 31416] Fail early in parseDateFromNullTerminatedCharacters
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 12 10:34:09 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31416
David Levin <levin at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #43071|review? |review-
Flag| |
--- Comment #2 from David Levin <levin at chromium.org> 2009-11-12 10:34:09 PST ---
(From update of attachment 43071)
Thanks for fixing this.
> Index: JavaScriptCore/ChangeLog
> +2009-11-11 Steve VanDeBogart <vandebo at chromium.org>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + Calculate the time offset only if we were able to parse
> + the date string. This saves an IPC in Chromium for
> + invalid date strings.
Please add a bug link.
> Index: JavaScriptCore/wtf/DateMath.cpp
> @@ -825,7 +825,7 @@ double parseDateFromNullTerminatedCharac
> int offset;
> double ms = parseDateFromNullTerminatedCharacters(dateString, haveTZ, offset);
> // fall back to local timezone
Just do
if (isnan(ms))
return NaN;
> - if (!haveTZ) {
> + if (!haveTZ && ms != NaN) {
Also there is another instance to fix in "double
parseDateFromNullTerminatedCharacters(ExecState* exec, const char* dateString)"
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list