diff options
Diffstat (limited to 'libglusterfs')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index ac0325f9d60..5345924a41d 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -2453,7 +2453,10 @@ valid_ipv4_subnetwork (const char *address)                                    "Invalid IPv4 subnetwork address");                  goto out;          } - +        /* +         * Reset errno before checking it +         */ +        errno = 0;          prefixlen = strtol (slash + 1, &endptr, 10);          if ((errno != 0) || (*endptr != '\0') ||              (prefixlen < 0) || (prefixlen > IPv4_ADDR_SIZE)) {  | 
