summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1997-12-13 05:27:29 +0000
committerjdp <jdp@FreeBSD.org>1997-12-13 05:27:29 +0000
commit11934fd03fc109364863e8e94204a08d213f3581 (patch)
treec145aafc3452cea6a43a8958d47f46a1f5ef8ecd /usr.sbin/pppd
parentf13ddbc86500ce893f62460b62d775089a14aba0 (diff)
downloadFreeBSD-src-11934fd03fc109364863e8e94204a08d213f3581.zip
FreeBSD-src-11934fd03fc109364863e8e94204a08d213f3581.tar.gz
Fix a segmentation violation that happened if "auth" was in the
options file but there was no suitable secret in the secrets file.
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r--usr.sbin/pppd/auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c
index 4e9745c..7248143 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 <stdio.h>
@@ -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;
}
OpenPOWER on IntegriCloud