aboutsummaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-04-23 17:28:14 +0930
committerAlan Modra <amodra@gmail.com>2017-04-23 20:33:35 +0930
commit7034215fd6d99f275998f7f0f8a346ab35fcbee6 (patch)
tree7c54ca22c9343b0c719568ab78c62050d0a58ba3 /binutils/ar.c
parentb02cd3e978e9273074f7cbe2ca1d5b372225a56d (diff)
downloadgdb-7034215fd6d99f275998f7f0f8a346ab35fcbee6.zip
gdb-7034215fd6d99f275998f7f0f8a346ab35fcbee6.tar.gz
gdb-7034215fd6d99f275998f7f0f8a346ab35fcbee6.tar.bz2
PR 21417, ar arg check failure
PR 21417 * ar.c (main): Check that an archive file is given after options.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index 274be46..8e4d81c 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -788,6 +788,8 @@ main (int argc, char **argv)
}
inarch_filename = argv[arg_index++];
+ if (inarch_filename == NULL)
+ usage (0);
for (file_count = 0; argv[arg_index + file_count] != NULL; file_count++)
continue;