File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1596,7 +1596,7 @@ parse_opts(int argc, char **argv)
15961596 errno = 0 ;
15971597 result = strtoul (optarg , & endptr , 16 );
15981598 if ((result == ULONG_MAX && errno == ERANGE ) ||
1599- (* endptr != '\0' )) {
1599+ (* endptr != '\0' ) || ( * optarg == '\0' ) ) {
16001600 print_error_arrow (optarg , endptr - optarg ,
16011601 "Invalid bootnum value" );
16021602 conditional_error_reporter (opts .verbose >= 1 ,
@@ -1736,7 +1736,7 @@ parse_opts(int argc, char **argv)
17361736 errno = 0 ;
17371737 result = strtoul (optarg , & endptr , 16 );
17381738 if ((result == ULONG_MAX && errno == ERANGE ) ||
1739- (* endptr != '\0' )) {
1739+ (* endptr != '\0' ) || ( * optarg == '\0' ) ) {
17401740 print_error_arrow (optarg , endptr - optarg ,
17411741 "Invalid BootNext value" );
17421742 conditional_error_reporter (opts .verbose >= 1 ,
You can’t perform that action at this time.
0 commit comments