From 11934fd03fc109364863e8e94204a08d213f3581 Mon Sep 17 00:00:00 2001 From: jdp Date: Sat, 13 Dec 1997 05:27:29 +0000 Subject: [PATCH] Fix a segmentation violation that happened if "auth" was in the options file but there was no suitable secret in the secrets file. --- usr.sbin/pppd/auth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c index 4e9745c5b667..72481432d78f 100644 --- a/usr.sbin/pppd/auth.c +++ b/usr.sbin/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.19 1997/10/10 06:02:54 peter Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.20 1997/10/28 16:50:56 brian Exp $"; #endif #include @@ -1477,7 +1477,8 @@ scan_authfile(f, client, server, ipaddr, secret, addrs, filename) else if (addr_list != NULL) free_wordlist(addr_list); - non_wildclient = (best_flag & NONWILD_CLIENT) && *client != '\0'; + non_wildclient = (best_flag & NONWILD_CLIENT) && client != NULL && + *client != '\0'; return best_flag; }