projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aaab4e5
)
(find_match): recheck argv[argi] in multi-word match. Fixes crash when
author
Ron Unrau
<runrau@cygnus>
Sun, 1 Mar 1998 14:49:50 +0000
(14:49 +0000)
committer
Ron Unrau
<runrau@cygnus>
Sun, 1 Mar 1998 14:49:50 +0000
(14:49 +0000)
subset words are alone on the command line.
sim/common/sim-options.c
patch
|
blob
|
history
diff --git
a/sim/common/sim-options.c
b/sim/common/sim-options.c
index e94f9aad43d84579ea619890f1c2ded46526862f..01d1a7e5b900361f88d46e35aba69b2021c7431b 100644
(file)
--- a/
sim/common/sim-options.c
+++ b/
sim/common/sim-options.c
@@
-803,7
+803,8
@@
find_match (SIM_DESC sd, sim_cpu *cpu, char *argv[], int *pargi)
const char *name = opt->opt.name;
if (name == NULL)
continue;
- while (strncmp (name, argv [argi], strlen (argv [argi])) == 0)
+ while (argv [argi] != NULL
+ && strncmp (name, argv [argi], strlen (argv [argi])) == 0)
{
name = &name [strlen (argv[argi])];
if (name [0] == '-')