mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user