Fix invalid reads

Don't use a guint16* when getting a guint property via g_object_get()!

Bug #628323.
This commit is contained in:
Christian Persch 2010-08-30 10:21:43 -04:00 committed by Matthias Clasen
parent 08924ad147
commit fa671dc5e2
2 changed files with 5 additions and 2 deletions

View File

@ -627,13 +627,16 @@ g_proxy_address_enumerator_set_property (GObject *object,
conn = g_network_address_parse_uri (uri, 0, NULL);
if (conn)
{
guint port;
priv->dest_uri = g_strdup (uri);
g_object_get (conn,
"hostname", &priv->dest_hostname,
"port", &priv->dest_port,
"port", &port,
NULL);
priv->dest_port = port;
g_object_unref (conn);
}
else

View File

@ -4,7 +4,7 @@ static void
test_basic (void)
{
GNetworkAddress *address;
guint16 port;
guint port;
gchar *hostname;
address = (GNetworkAddress*)g_network_address_new ("www.gnome.org", 8080);