mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
fix system fatal error caused by imperfect user input commands, e.g. "rtl sym -u"
This commit is contained in:
1 parent
30ae3ef9da
commit
a0eecb52bc
1 file changed
+1
-1
@@ -265,7 +265,7 @@ rtems_rtl_parse_arg_index (const char opt,
|
||||
/*
|
||||
* Is this an option and does it match what we are looking for?
|
||||
*/
|
||||
if (argv[arg][0] == '-' && argv[arg][1] == opt && arg < argc)
|
||||
if (arg < argc && argv[arg][0] == '-' && argv[arg][1] == opt)
|
||||
return arg + 1;
|
||||
}
|
||||
return -1;
|
||||
|
||||
Reference in new issue
Block a user