mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-14 15:29:35 +02:00
util/nvmutil: add defensive buffer check
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user