Rubber-stamped by Kevin Ollivier.
authorbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2009 19:41:48 +0000 (19:41 +0000)
committerbfulgham@webkit.org <bfulgham@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2009 19:41:48 +0000 (19:41 +0000)
Handle crash in wx due to null value passed to strlen in
the CString constructor.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath):  Check for null return from getenv
and use default CString constructor instead.

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

WebCore/ChangeLog
WebCore/platform/network/curl/ResourceHandleManager.cpp

index 78a98c3..f9f380e 100644 (file)
@@ -1,3 +1,14 @@
+2009-08-12  Brent Fulgham  <bfulgham@webkit.org>
+
+        Rubber-stamped by Kevin Ollivier.
+
+        Handle crash in wx due to null value passed to strlen in
+        the CString constructor.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::certificatePath):  Check for null return from getenv
+        and use default CString constructor instead.
+
 2009-08-12  Yong Li  <yong.li@torchmobile.com>
 
         Reviewed by Eric Seidel.
index 75d44a5..201e264 100644 (file)
@@ -67,7 +67,11 @@ static CString certificatePath()
         return path;
     }
 #endif
-    return getenv("CURL_CA_BUNDLE_PATH");
+    char* envPath = getenv("CURL_CA_BUNDLE_PATH");
+    if (envPath)
+       return envPath;
+
+    return CString();
 }
 
 ResourceHandleManager::ResourceHandleManager()