mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Fixed check if ip_strv is NULL
This commit is contained in:
parent
c24eaec77a
commit
7385b120a7
@ -85,6 +85,9 @@ unsigned char is_netmask_v4(char *ip_strv4) {
|
||||
char *mask_str = NULL;
|
||||
int cidr;
|
||||
|
||||
if(ip_strv4 == NULL)
|
||||
return netmask_v4;
|
||||
|
||||
if ((mask_str = strchr(ip_strv4, '/'))) {
|
||||
*(mask_str++) = '\0';
|
||||
|
||||
@ -114,6 +117,9 @@ unsigned char is_netmask_v6(char *ip_strv6) {
|
||||
char *mask_str = NULL;
|
||||
int cidr;
|
||||
|
||||
if(ip_strv6 == NULL)
|
||||
return netmask_v6;
|
||||
|
||||
if ((mask_str = strchr(ip_strv6, '/'))) {
|
||||
*(mask_str++) = '\0';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user