ref: 077e62c8ac33c434e76cb6594b38e4a60db15998
parent: 857c5cddb08a35830fa790ee5a6981b9a50b1378
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Feb 22 02:46:15 EST 2018
[ar] Fix inlist() We have NULL parameters now, so we have to check against them.
--- a/ar/main.c
+++ b/ar/main.c
@@ -202,7 +202,7 @@
inlist(char *fname, int argc, char *argv[])
{
for (; argc-- > 0; ++argv) {
- if (!strcmp(*argv, fname)) {
+ if (*argv && !strcmp(*argv, fname)) {
*argv = NULL;
return 1;
}