Use sudo_strtonum() explicitly instead of via a macro.

This commit is contained in:
Todd C. Miller
2019-10-14 10:09:30 -06:00
parent 04a17095be
commit 2512f6efbf
23 changed files with 55 additions and 46 deletions

View File

@@ -132,7 +132,7 @@ addr_matches_if_netmask(const char *n, const char *m)
debug_return_bool(false);
}
} else {
i = strtonum(m, 1, 32, &errstr);
i = sudo_strtonum(m, 1, 32, &errstr);
if (errstr != NULL) {
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"IPv4 netmask %s: %s", m, errstr);
@@ -145,7 +145,7 @@ addr_matches_if_netmask(const char *n, const char *m)
#ifdef HAVE_STRUCT_IN6_ADDR
else {
if (inet_pton(AF_INET6, m, &mask.ip6) != 1) {
j = strtonum(m, 1, 128, &errstr);
j = sudo_strtonum(m, 1, 128, &errstr);
if (errstr != NULL) {
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"IPv6 netmask %s: %s", m, errstr);