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 <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-06 16:41:59 +00:00
parent a82c766b8c
commit a358a6fe09
+1 -1
View File
@@ -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)