From 2000297011172a9f04be41aca76411bde2c54a76 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 19 Jun 2020 16:56:02 +0100 Subject: [util] Treat empty integer strings as invalid Signed-off-by: Michael Brown --- src/util/elf2efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/elf2efi.c') diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index bcd53c9af..4f517d7d2 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -996,7 +996,7 @@ static int parse_options ( const int argc, char **argv, switch ( c ) { case 's': opts->subsystem = strtoul ( optarg, &end, 0 ); - if ( *end ) { + if ( *end || ( ! *optarg ) ) { eprintf ( "Invalid subsytem \"%s\"\n", optarg ); exit ( 2 ); -- cgit v1.2.3-55-g7522