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.
Created attachment 416151 [details] Patch
This bug can be reproduced in https://www.websocket.org/echo.html using older versions of libsoup. I confirm that the patch fixes the problem.
Committed r270825: <https://trac.webkit.org/changeset/270825> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416151 [details].