diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-12-23 21:07:44 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-12-23 21:07:44 +0000 |
commit | 13044a42fa3dfed03673ed90f172a1d82a4a1855 (patch) | |
tree | 61a849a2ea9a38b9e32d250c362975c3c6e6e845 | |
parent | ec3b838ff8d900a7b5c0a5d48be8e1a4db806883 (diff) |
avoid null deref in calling option_erro(); pt out by hunter@comsys.com.ua
-rw-r--r-- | usr.sbin/pppd/options.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c index 25170cd776a..7928f388b37 100644 --- a/usr.sbin/pppd/options.c +++ b/usr.sbin/pppd/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.17 2002/07/01 19:31:37 deraadt Exp $ */ +/* $OpenBSD: options.c,v 1.18 2002/12/23 21:07:43 mickey Exp $ */ /* * options.c - handles option processing for PPP. @@ -46,7 +46,7 @@ #if 0 static char rcsid[] = "Id: options.c,v 1.42 1998/03/26 04:46:06 paulus Exp $"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.17 2002/07/01 19:31:37 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.18 2002/12/23 21:07:43 mickey Exp $"; #endif #endif @@ -1974,8 +1974,11 @@ setnoauth(argv) char **argv; { if (auth_required && privileged_option < auth_req_info.priv) { - option_error("cannot override auth option set by %s", - auth_req_info.source); + if (auth_req_info.source == NULL) + option_error("cannot override default auth option"); + else + option_error("cannot override auth option set by %s", + auth_req_info.source); return 0; } auth_required = 0; |