diff options
author | 2014-07-09 23:30:34 +0000 | |
---|---|---|
committer | 2014-07-09 23:30:34 +0000 | |
commit | 53ad1bbf3d35b30f516ff4c6ba2fb0f701a80cc9 (patch) | |
tree | 7050a729ab473ae05b327e84e6f6d4bdb53f39a3 | |
parent | floppy disks are obsolete. recommend keeping the keyfile on a flash disk (diff) | |
download | wireguard-openbsd-53ad1bbf3d35b30f516ff4c6ba2fb0f701a80cc9.tar.xz wireguard-openbsd-53ad1bbf3d35b30f516ff4c6ba2fb0f701a80cc9.zip |
When copying structures via imsg, the contents should not contain
bogus pointer values - make sure to zero the first rule_kv element.
awesome benno@
-rw-r--r-- | usr.sbin/relayd/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/config.c b/usr.sbin/relayd/config.c index 6fe4fa09789..edc97759585 100644 --- a/usr.sbin/relayd/config.c +++ b/usr.sbin/relayd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.15 2014/07/09 16:42:05 reyk Exp $ */ +/* $OpenBSD: config.c,v 1.16 2014/07/09 23:30:34 reyk Exp $ */ /* * Copyright (c) 2011 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -760,6 +760,7 @@ config_getrule(struct relayd *env, struct imsg *imsg) } \ } + memset(&rule->rule_kv[0], 0, sizeof(struct kv)); for (i = 1; i < KEY_TYPE_MAX; i++) { GETKV(i, key); GETKV(i, value); |