summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/libreboot-utils/nvmutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/libreboot-utils/nvmutil.c b/util/libreboot-utils/nvmutil.c
index 3102bd50..26d15145 100644
--- a/util/libreboot-utils/nvmutil.c
+++ b/util/libreboot-utils/nvmutil.c
@@ -32,8 +32,11 @@ main(int argc, char *argv[])
struct xfile *f;
size_t c;
- (void) errhook(exit_cleanup);
(void) lbsetprogname(argv[0]);
+ if (argc < 3)
+ usage();
+
+ (void) errhook(exit_cleanup);
/* https://man.openbsd.org/pledge.2 */
/* https://man.openbsd.org/unveil.2 */