mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[util] Treat empty integer strings as invalid
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
+1
-1
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user