diff options
author | Tom Tromey <tromey@redhat.com> | 2002-01-31 00:52:16 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-01-31 00:52:16 +0000 |
commit | 250fce1dfa15e987e9763b20398707490d8fd669 (patch) | |
tree | fff639128357f4339d816d9d2506e1763fef054d /fastjar | |
parent | 2083b5be4d96aefccfb38fc972bf211570209e33 (diff) | |
download | gcc-250fce1dfa15e987e9763b20398707490d8fd669.zip gcc-250fce1dfa15e987e9763b20398707490d8fd669.tar.gz gcc-250fce1dfa15e987e9763b20398707490d8fd669.tar.bz2 |
jartool.c (main): NULL-terminate new_argv.
* jartool.c (main): NULL-terminate new_argv. Pass 0 as argument
to init_args.
From-SVN: r49351
Diffstat (limited to 'fastjar')
-rw-r--r-- | fastjar/ChangeLog | 5 | ||||
-rw-r--r-- | fastjar/jartool.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index d40abaa..41b4f58 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,8 @@ +2002-01-30 Tom Tromey <tromey@redhat.com> + + * jartool.c (main): NULL-terminate new_argv. Pass 0 as argument + to init_args. + 2002-01-11 Tom Tromey <tromey@redhat.com> * Makefile.in: Rebuilt. diff --git a/fastjar/jartool.c b/fastjar/jartool.c index dd71592..afd08a7 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -404,6 +404,7 @@ int main(int argc, char **argv){ all following options are handled as file names. */ while (optind < argc) new_argv[new_argc++] = argv[optind++]; + new_argv[new_argc] = NULL; if(action == ACTION_NONE){ fprintf(stderr, "One of options -{ctxu} must be specified.\n"); @@ -495,7 +496,7 @@ int main(int argc, char **argv){ else if(manifest) make_manifest(jarfd, NULL); - init_args (new_argv, new_argc); + init_args (new_argv, 0); /* now we add the files to the archive */ while ((arg = get_next_arg ())){ |