diff options
author | Geoffrey Keating <geoffk@geoffk.org> | 2000-08-11 18:26:28 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@geoffk.org> | 2000-08-11 18:26:28 +0000 |
commit | 8d720007042d05f12a6a42ec10154473f99dbfdb (patch) | |
tree | 7ba2b015fc2b5601582403863a23682b9c8ac1d0 /binutils/ar.c | |
parent | bc4466dcf10e23054dc420c9eee11210dce0e9d8 (diff) | |
download | gdb-8d720007042d05f12a6a42ec10154473f99dbfdb.zip gdb-8d720007042d05f12a6a42ec10154473f99dbfdb.tar.gz gdb-8d720007042d05f12a6a42ec10154473f99dbfdb.tar.bz2 |
* ar.c (main): Don't crash if called with no arguments
or only '-X32_64' as an argument.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r-- | binutils/ar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index d640159..fe5709f 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -437,7 +437,7 @@ main (argc, argv) of object files in the archive (the 64-bit objects or the 32-bit objects). GNU ar always looks at all kinds of objects in an archive. */ - while (strcmp (argv[1], "-X32_64") == 0) + while (argc > 1 && strcmp (argv[1], "-X32_64") == 0) { argv++; argc--; |