Title: [144020] trunk/Source/WTF
Revision
144020
Author
[email protected]
Date
2013-02-26 00:49:28 -0800 (Tue, 26 Feb 2013)

Log Message

Appease static analyzer warning about null string passed to strlen
https://bugs.webkit.org/show_bug.cgi?id=110658

Reviewed by Benjamin Poulain.

Add a null check before calling strlen

* wtf/Threading.cpp:
(WTF::createThread):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (144019 => 144020)


--- trunk/Source/WTF/ChangeLog	2013-02-26 08:42:14 UTC (rev 144019)
+++ trunk/Source/WTF/ChangeLog	2013-02-26 08:49:28 UTC (rev 144020)
@@ -1,3 +1,15 @@
+2013-02-26  Oliver Hunt  <[email protected]>
+
+        Appease static analyzer warning about null string passed to strlen
+        https://bugs.webkit.org/show_bug.cgi?id=110658
+
+        Reviewed by Benjamin Poulain.
+
+        Add a null check before calling strlen
+
+        * wtf/Threading.cpp:
+        (WTF::createThread):
+
 2013-02-25  Ryosuke Niwa  <[email protected]>
 
         Build fix attempt after r143996.

Modified: trunk/Source/WTF/wtf/Threading.cpp (144019 => 144020)


--- trunk/Source/WTF/wtf/Threading.cpp	2013-02-26 08:42:14 UTC (rev 144019)
+++ trunk/Source/WTF/wtf/Threading.cpp	2013-02-26 08:49:28 UTC (rev 144020)
@@ -74,7 +74,7 @@
     // Visual Studio has a 31-character limit on thread names. Longer names will
     // be truncated silently, but we'd like callers to know about the limit.
 #if !LOG_DISABLED
-    if (strlen(name) > 31)
+    if (name && strlen(name) > 31)
         LOG_ERROR("Thread name \"%s\" is longer than 31 characters and will be truncated by Visual Studio", name);
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to