summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-07 02:35:03 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-07 02:35:03 +0000
commit7bfe134a1983a88dcf50d2f33d0c69739d225eb9 (patch)
tree753023fa9dae0527880a8b027ecd08fd35981867 /util/nvmutil
parent14ad5a981829750dbaca8f7dff1929c88fa18d79 (diff)
util/nvmutil: reset mac_buf for mac parsing
preventative fix for later, if the tool is ever expanded to have a better command syntax, for supporting more than one file at a time. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 3c59cd0c..fbf6e303 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -482,6 +482,8 @@ parse_mac_string(void)
if (strlen(mac_str) != 17)
err(EINVAL, "MAC address is the wrong length");
+ memset(mac_buf, 0, sizeof(mac_buf));
+
for (mac_byte = 0; mac_byte < 6; mac_byte++)
set_mac_byte(mac_byte);