summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-03-27 12:20:49 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-03-27 12:20:49 +0000
commit991fd8de7ef2805fb000ced83402cc9912621b9b (patch)
treead5940f2b6d173c737657e447229a577edccb6b1 /sbin
parent3383ea464639dbf088c526c487ae3bf3787709b4 (diff)
Fix use of 'idstr' and 'idstrlen' arguments in print_static_id().
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ikev2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index dfafd4d3b0b..3d0c13f7e25 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.202 2020/03/24 19:14:53 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.203 2020/03/27 12:20:48 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -5958,13 +5958,13 @@ ikev2_print_static_id(struct iked_static_id *id, char *idstr, size_t idstrlen)
bzero(&idp, sizeof(idp));
if ((idp.id_buf = ibuf_new(id->id_data, id->id_length)) == NULL) {
- bzero(&idstr, sizeof(idstr));
+ bzero(idstr, idstrlen);
return (-1);
}
idp.id_type = id->id_type;
idp.id_offset = id->id_offset;
- if (ikev2_print_id(&idp, idstr, sizeof(idstr)) == -1) {
- bzero(&idstr, sizeof(idstr));
+ if (ikev2_print_id(&idp, idstr, idstrlen) == -1) {
+ bzero(idstr, idstrlen);
goto done;
}
ret = 0;