diff options
author | Jim Meyering <jim@meyering.net> | 2003-07-16 06:43:02 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-07-16 06:43:02 +0000 |
commit | 0049fa1eda0434a8ef0bf323217b7fe98a037531 (patch) | |
tree | 7452e6bdeb85e88ef84aef5cb0fcdf598891925d /src | |
parent | 02ba3015502357cf47576ba7d2dce58445788356 (diff) | |
download | coreutils-0049fa1eda0434a8ef0bf323217b7fe98a037531.tar.xz |
Running `[' with no arguments would evoke a segfault.
(main) [LBRACKET]: Move initialization of argv to
precede potential use via test_syntax_error.
Diffstat (limited to 'src')
-rw-r--r-- | src/test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test.c b/src/test.c index 1fec21f8d..3db4f93fd 100644 --- a/src/test.c +++ b/src/test.c @@ -1091,6 +1091,8 @@ main (int margc, char **margv) parse_long_options (margc, margv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); + argv = margv; + if (LBRACKET) { --margc; @@ -1099,7 +1101,6 @@ main (int margc, char **margv) test_syntax_error (_("missing `]'\n"), NULL); } - argv = margv; argc = margc; pos = 1; |