X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fsubnet_parse.c;h=312e310cebfd1d49e41fd8c1f47483b634715273;hb=f144971bf2e13baa80e41188546533f73f3cf453;hp=044d6e729564ce5c6b7cdc962131bbfd7af4a0bd;hpb=3074dad170a1c6755090bd12c3fb9903cde531ab;p=tinc diff --git a/src/subnet_parse.c b/src/subnet_parse.c index 044d6e72..312e310c 100644 --- a/src/subnet_parse.c +++ b/src/subnet_parse.c @@ -307,7 +307,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { char *last_colon = strrchr(str, ':'); /* Check that the last colon is not further than possible in an IPv6 address */ - if(last_colon >= str + 5 * 8) { + if(last_colon && last_colon >= str + 5 * 8) { return false; }