summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2015-05-12 05:30:24 +0000
committeryasuoka <yasuoka@openbsd.org>2015-05-12 05:30:24 +0000
commite402d49ce7c1578f1a410a1883e4fd35195616c8 (patch)
treeb013228d930802b5d761b13eef499791e964f0ab
parentimxiic is known to be broken don't try attaching it on utilite (diff)
downloadwireguard-openbsd-e402d49ce7c1578f1a410a1883e4fd35195616c8.tar.xz
wireguard-openbsd-e402d49ce7c1578f1a410a1883e4fd35195616c8.zip
Fix an uninitialized variable access when pptp.hostname is configured.
-rw-r--r--usr.sbin/npppd/pptp/pptp_ctrl.c6
1 files changed, 3 insertions, 3 deletions
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 <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -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));