Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
gtk-vnc
gtk-vnc-invalid-host-crash.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtk-vnc-invalid-host-crash.patch of Package gtk-vnc
From c61d47c7e25110073395458cb92d87e53489850a Mon Sep 17 00:00:00 2001 From: Christophe Fergeau <cfergeau@redhat.com> Date: Fri, 9 Dec 2016 16:09:41 +0100 Subject: [PATCH] Avoid crash if attempt to connect to an invalid host or port If vnc_display_open_host() is called with a NULL port or host, vnc_connection_open_host_internal() will eventually crash. This commits adds runtime checks to return early with g_return_val_if_fail() when this happens rather than crashing #0 0x00007ffff37de3d3 in __strchr_sse2 () at ../sysdeps/x86_64/strchr.S:32 #1 0x00007ffff4661a17 in g_inet_socket_address_new_from_string (address=0x0, port=0) at ginetsocketaddress.c:416 #2 0x00007ffff466b784 in g_network_address_parse_sockaddr (addr=addr@entry=0x969f50 [GNetworkAddress]) at gnetworkaddress.c:245 #3 0x00007ffff466ba94 in g_network_address_address_enumerator_next (enumerator=0x972ca0 [GNetworkAddressAddressEnumerator], cancellable=0x0, error=<optimized out>) at gnetworkaddress.c:919 #4 0x00007ffff727130b in vnc_connection_open_host_internal (conn=0x99bbf0 [VncConnection]) at vncconnection.c:5395 #5 0x00007ffff7271523 in vnc_connection_coroutine (opaque=0x99bbf0) at vncconnection.c:5448 #6 0x00007ffff7272e54 in coroutine_trampoline (cc=0x998080) at coroutine_ucontext.c:55 #7 0x00007ffff7272b65 in continuation_trampoline (i0=10059904, i1=0) at continuation.c:43 #8 0x00007ffff379dc00 in __start_context () at /lib64/libc.so.6 #9 0x0000000000998448 in () #10 0x0000000000000000 in () --- src/vncconnection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vncconnection.c b/src/vncconnection.c index 8a52346..61f74b4 100644 --- a/src/vncconnection.c +++ b/src/vncconnection.c @@ -5425,6 +5425,8 @@ static gboolean vnc_connection_open_host_internal(VncConnection *conn) VNC_DEBUG("Resolving host %s %s", priv->host, priv->port); + g_return_val_if_fail((priv->host != NULL) && (port != 0), FALSE); + addr = g_network_address_new(priv->host, port); enumerator = g_socket_connectable_enumerate (addr); -- 2.32.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor