From: yasuoka Date: Tue, 12 May 2015 05:30:24 +0000 (+0000) Subject: Fix an uninitialized variable access when pptp.hostname is configured. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e402d49ce7c1578f1a410a1883e4fd35195616c8;p=openbsd Fix an uninitialized variable access when pptp.hostname is configured. --- diff --git a/usr.sbin/npppd/pptp/pptp_ctrl.c b/usr.sbin/npppd/pptp/pptp_ctrl.c index 80de9c12ea2..1dfdc030b87 100644 --- a/usr.sbin/npppd/pptp/pptp_ctrl.c +++ b/usr.sbin/npppd/pptp/pptp_ctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_ctrl.c,v 1.9 2015/01/19 01:48:59 deraadt Exp $ */ +/* $OpenBSD: pptp_ctrl.c,v 1.10 2015/05/12 05:30:24 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -29,7 +29,7 @@ * PPTP(RFC 2637) control connection implementation. * currently it only support PAC part */ -/* $Id: pptp_ctrl.c,v 1.9 2015/01/19 01:48:59 deraadt Exp $ */ +/* $Id: pptp_ctrl.c,v 1.10 2015/05/12 05:30:24 yasuoka Exp $ */ #include #include #include @@ -749,7 +749,7 @@ pptp_ctrl_send_SCCRP(pptp_ctrl *_this, int result, int error) * 63 character */ /* host name */ - if (PPTP_CTRL_CONF(_this)->hostname == NULL) + if ((val = PPTP_CTRL_CONF(_this)->hostname) == NULL) val = ""; strlcpy(scc->host_name, val, sizeof(scc->host_name));