util/nvmutil: validate ARG_PART and ARG_NOPART

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-08 17:57:28 +00:00
parent 5532a721f5
commit 3330f005fd
+6
View File
@@ -414,6 +414,12 @@ sanitize_command_index(size_t c)
if (command[c].arg_part > 1)
err(ECANCELED, "cmd index %zu: arg_part above 1", c);
if (ARG_NOPART)
err(ECANCELED, "ARG_NOPART is non-zero");
if (ARG_PART != 1)
err(ECANCELED, "ARG_PART is a value other than one");
}
static void