Title: [222730] trunk/Source/WebCore
- Revision
- 222730
- Author
- [email protected]
- Date
- 2017-10-02 12:04:09 -0700 (Mon, 02 Oct 2017)
Log Message
[curl] Crashes in CurlRequest::setupPUT()
https://bugs.webkit.org/show_bug.cgi?id=177733
Patch by Fujii Hironori <[email protected]> on 2017-10-02
Reviewed by Alex Christensen.
Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::setupPUT): Null-check the result of request.httpBody().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222729 => 222730)
--- trunk/Source/WebCore/ChangeLog 2017-10-02 19:02:27 UTC (rev 222729)
+++ trunk/Source/WebCore/ChangeLog 2017-10-02 19:04:09 UTC (rev 222730)
@@ -1,3 +1,15 @@
+2017-10-02 Fujii Hironori <[email protected]>
+
+ [curl] Crashes in CurlRequest::setupPUT()
+ https://bugs.webkit.org/show_bug.cgi?id=177733
+
+ Reviewed by Alex Christensen.
+
+ Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
+
+ * platform/network/curl/CurlRequest.cpp:
+ (WebCore::CurlRequest::setupPUT): Null-check the result of request.httpBody().
+
2017-10-02 Basuke Suzuki <[email protected]>
[CURL] Should handle redirects in WebCore
Modified: trunk/Source/WebCore/platform/network/curl/CurlRequest.cpp (222729 => 222730)
--- trunk/Source/WebCore/platform/network/curl/CurlRequest.cpp 2017-10-02 19:02:27 UTC (rev 222729)
+++ trunk/Source/WebCore/platform/network/curl/CurlRequest.cpp 2017-10-02 19:04:09 UTC (rev 222730)
@@ -368,8 +368,8 @@
// Disable the Expect: 100 continue header
m_curlHandle->removeRequestHeader("Expect");
- auto numElements = request.httpBody()->elements().size();
- if (!numElements)
+ auto body = request.httpBody();
+ if (!body || body->isEmpty())
return;
setupFormData(request, false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes