mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
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
This commit is contained in:
parent
641864bcba
commit
ebe47823db
@ -393,6 +393,8 @@ g_inet_address_new_from_string (const gchar *string)
|
|||||||
struct in6_addr in6_addr;
|
struct in6_addr in6_addr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
g_return_val_if_fail (string != NULL, NULL);
|
||||||
|
|
||||||
/* If this GInetAddress is the first networking-related object to be
|
/* If this GInetAddress is the first networking-related object to be
|
||||||
* created, then we won't have called g_networking_init() yet at
|
* created, then we won't have called g_networking_init() yet at
|
||||||
* this point.
|
* this point.
|
||||||
|
Loading…
Reference in New Issue
Block a user