Reviewed by darin.
authorkjk <kjk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2007 22:52:38 +0000 (22:52 +0000)
committerkjk <kjk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2007 22:52:38 +0000 (22:52 +0000)
        Coverity fix. Coverity says:
        "Event check_after_deref: Pointer "dateString" dereferenced before NULL check"

        * kjs/date_object.cpp:
        (KJS::parseDate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/date_object.cpp

index 4f85b25..5d27a56 100644 (file)
@@ -3,6 +3,16 @@
         Reviewed by darin.
 
         Coverity fix. Coverity says:
         Reviewed by darin.
 
         Coverity fix. Coverity says:
+        "Event check_after_deref: Pointer "dateString" dereferenced before NULL check"
+
+        * kjs/date_object.cpp:
+        (KJS::parseDate):
+
+2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
+
+        Reviewed by darin.
+
+        Coverity fix. Coverity says:
         "Event check_after_deref: Pointer "re" dereferenced before NULL check"
 
         * pcre/pcre_study.c:
         "Event check_after_deref: Pointer "re" dereferenced before NULL check"
 
         * pcre/pcre_study.c:
index a05c4ed..6c4a914 100644 (file)
@@ -815,7 +815,7 @@ static double parseDate(const UString &date)
     }
 
     // Missing delimiter between month and day (like "January29")?
     }
 
     // Missing delimiter between month and day (like "January29")?
-    if (month == -1 && dateString && wordStart != dateString)
+    if (month == -1 && wordStart != dateString)
         month = findMonth(wordStart);
 
     skipSpacesAndComments(dateString);
         month = findMonth(wordStart);
 
     skipSpacesAndComments(dateString);