[Webkit-unassigned] [Bug 238797] [GTK][WPE] RemoteInspector add support for IPv6
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 5 08:11:02 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=238797
Michael Catanzaro <mcatanzaro at gnome.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mcatanzaro at gnome.org
--- Comment #7 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Comment on attachment 456686
--> https://bugs.webkit.org/attachment.cgi?id=456686
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=456686&action=review
> Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.cpp:194
> - g_warning("Failed to start remote inspector server on %s:%u: %s\n", address, port, error->message);
> + GUniquePtr<char> address(g_socket_connectable_to_string(G_SOCKET_CONNECTABLE(socketAddress.get())));
> + g_warning("Failed to start remote inspector server on %s: %s\n", address.get(), error->message);
No trailing \n! (Does other preexisting code have this problem?)
> Source/WebKit/UIProcess/API/glib/WebKitInitialize.cpp:71
> + char* addressPtr = inspectorAddress.get();
> + if (addressPtr[0] == '[' && *(portPtr - 2) == ']') {
> + // Strip the square brackets.
> + addressPtr++;
> + *(portPtr - 2) = '\0';
> + }
Careful: if for some reason the colon is the first or second character in the string, then you'll have memory corruption here. Got to make sure it's safe before dereferencing *(portPtr - 2)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220405/24c67646/attachment-0001.htm>
More information about the webkit-unassigned
mailing list