summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2016-05-21 19:06:15 +0000
committerkettenis <kettenis@openbsd.org>2016-05-21 19:06:15 +0000
commit86989bc3cc4958977b8860dec5fee7482e4137b7 (patch)
tree575001607646e6b58aecb7e9e9f6910a5f509a99
parentRemove the -x flag from mount_msdos and always assume the execute bit (diff)
downloadwireguard-openbsd-86989bc3cc4958977b8860dec5fee7482e4137b7.tar.xz
wireguard-openbsd-86989bc3cc4958977b8860dec5fee7482e4137b7.zip
Zero op_name when we start enumerating properties such that we don't risk
skipping the properties of the root node when the lookup of random stack garbage fails. ok deraadt@
-rw-r--r--usr.sbin/eeprom/optree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/eeprom/optree.c b/usr.sbin/eeprom/optree.c
index b77992c0f4c..f6cff9a7d3e 100644
--- a/usr.sbin/eeprom/optree.c
+++ b/usr.sbin/eeprom/optree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optree.c,v 1.6 2009/01/14 21:05:53 fgsch Exp $ */
+/* $OpenBSD: optree.c,v 1.7 2016/05/21 19:06:15 kettenis Exp $ */
/*
* Copyright (c) 2007 Federico G. Schwindt <fgsch@openbsd.org>
@@ -111,6 +111,7 @@ op_nodes(int fd, int node, int depth)
char op_name[BUFSIZE];
struct opiocdesc opio;
+ memset(op_name, 0, sizeof(op_name));
opio.op_nodeid = node;
opio.op_buf = op_buf;
opio.op_name = op_name;