util/nvmutil: add defensive buffer check

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-17 18:19:40 +00:00
parent 400369b361
commit 38022c5d47
+3
View File
@@ -162,6 +162,9 @@ main(int argc, char *argv[])
if (argc < 3)
usage();
if (nv->f.buf == NULL)
err(EINVAL, "Work buffer not initialised");
if (CHAR_BIT != 8)
err(EINVAL, "Unsupported char size");