diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-08-20 19:55:35 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-08-20 19:55:35 +0200 |
commit | d6767b4ed64fe2a7b5f4e00181035a34e68f90c8 (patch) | |
tree | 0bb05531be5415bace4e43a5faea90e45f6ce19c /src | |
parent | 2f0d39f98de30c7b38210a8f3abac57b240d5113 (diff) | |
download | weechat-d6767b4ed64fe2a7b5f4e00181035a34e68f90c8.zip |
api: fix crash in function network_connect_to() if address is NULL (issue #781)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-network.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-network.c b/src/core/wee-network.c index b61d18faf..44dcea4d6 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -674,6 +674,9 @@ network_connect_to (const char *proxy, struct sockaddr *address, sock = -1; proxy_addrinfo = NULL; + if (!address || (address_length == 0)) + return -1; + ptr_proxy = NULL; if (proxy && proxy[0]) { |