From: Philip Withnall Date: Fri, 18 Jul 2014 07:49:19 +0000 (+0100) Subject: ginetaddress: Add a precondition to g_inet_address_new_from_string() X-Git-Tag: 2.41.3~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebe47823db6409eda6e391826666b3eb8dedb692;p=platform%2Fupstream%2Fglib.git ginetaddress: Add a precondition to g_inet_address_new_from_string() Ensure that the input string is non-NULL, as inet_pton() does not like NULL strings. https://bugzilla.gnome.org/show_bug.cgi?id=733345 --- diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c index 8eac10b..9ff0c44 100644 --- a/gio/ginetaddress.c +++ b/gio/ginetaddress.c @@ -393,6 +393,8 @@ g_inet_address_new_from_string (const gchar *string) struct in6_addr in6_addr; #endif + g_return_val_if_fail (string != NULL, NULL); + /* If this GInetAddress is the first networking-related object to be * created, then we won't have called g_networking_init() yet at * this point.