From a358a6fe09ab795d80580f7bd7d99f4266b11544 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 6 Mar 2026 16:41:59 +0000 Subject: util/nvmutil: use strlen instead of strnlen strnlen isn't available on some older unices. we already know the string will be null-terminated, because it comes from argv, so runaway reads are extremely unlikely (read: impossible). Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 1da75d72..b727a539 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -359,7 +359,7 @@ parse_mac_string(void) { int mac_pos; - if (strnlen(mac, 20) != 17) + if (strlen(mac) != 17) err(EINVAL, "MAC address is the wrong length"); for (mac_pos = 0; mac_pos < 16; mac_pos += 3) -- cgit v1.2.1