strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
host: Properly handle NULL in host_create_from_string[_and_family]
[strongswan.git]
/
src
/
libstrongswan
/
networking
/
host.c
diff --git
a/src/libstrongswan/networking/host.c
b/src/libstrongswan/networking/host.c
index
07da3ef
..
2e464b0
100644
(file)
--- a/
src/libstrongswan/networking/host.c
+++ b/
src/libstrongswan/networking/host.c
@@
-354,6
+354,10
@@
host_t *host_create_from_string_and_family(char *string, int family,
struct sockaddr_in6 v6;
} addr;
+ if (!string)
+ {
+ return NULL;
+ }
if (streq(string, "%any"))
{
return host_create_any_port(family ? family : AF_INET, port);