Title: [270833] releases/WebKitGTK/webkit-2.30/Source/WebKit
- Revision
- 270833
- Author
- [email protected]
- Date
- 2020-12-15 05:08:34 -0800 (Tue, 15 Dec 2020)
Log Message
Merge r270825 - [SOUP] WebSockets: wrong data sent in some cases with libsoup < 2.68
https://bugs.webkit.org/show_bug.cgi?id=219850
Patch by Carlos Garcia Campos <[email protected]> on 2020-12-15
Reviewed by Michael Catanzaro.
We are using soup_websocket_connection_send_text() when libsoup < 2.68, which expects a null terminated string,
but we are receiving a IPC::DataReference that needs to be converted to a null terminated string by taking into
account its size.
* NetworkProcess/soup/WebSocketTaskSoup.cpp:
(WebKit::WebSocketTask::sendString):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog (270832 => 270833)
--- releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog 2020-12-15 13:08:15 UTC (rev 270832)
+++ releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog 2020-12-15 13:08:34 UTC (rev 270833)
@@ -1,3 +1,17 @@
+2020-12-15 Carlos Garcia Campos <[email protected]>
+
+ [SOUP] WebSockets: wrong data sent in some cases with libsoup < 2.68
+ https://bugs.webkit.org/show_bug.cgi?id=219850
+
+ Reviewed by Michael Catanzaro.
+
+ We are using soup_websocket_connection_send_text() when libsoup < 2.68, which expects a null terminated string,
+ but we are receiving a IPC::DataReference that needs to be converted to a null terminated string by taking into
+ account its size.
+
+ * NetworkProcess/soup/WebSocketTaskSoup.cpp:
+ (WebKit::WebSocketTask::sendString):
+
2020-11-03 Stephan Szabo <[email protected]>
[WinCairo/PlayStation] ICU 68.1 no longer exposes FALSE and TRUE macros by default
Modified: releases/WebKitGTK/webkit-2.30/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp (270832 => 270833)
--- releases/WebKitGTK/webkit-2.30/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp 2020-12-15 13:08:15 UTC (rev 270832)
+++ releases/WebKitGTK/webkit-2.30/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp 2020-12-15 13:08:34 UTC (rev 270833)
@@ -211,7 +211,7 @@
GRefPtr<GBytes> bytes = adoptGRef(g_bytes_new_static(utf8.data(), utf8.size()));
soup_websocket_connection_send_message(m_connection.get(), SOUP_WEBSOCKET_DATA_TEXT, bytes.get());
#else
- soup_websocket_connection_send_text(m_connection.get(), reinterpret_cast<const char*>(utf8.data()));
+ soup_websocket_connection_send_text(m_connection.get(), CString(reinterpret_cast<const char*>(utf8.data()), utf8.size()).data());
#endif
}
callback();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes