summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-11-08 00:39:16 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-11-08 00:39:16 +0000
commita0a587ed9761afe84e76d56c1b94d9e03a89a22a (patch)
tree17997fcbcabaf22429a273e688e2e2b5009a34da /usr.bin/ssh/packet.c
parenta43de758d80c580227b07a47b759441c1322b01c (diff)
use calloc for all structure allocations; from markus@
Diffstat (limited to 'usr.bin/ssh/packet.c')
-rw-r--r--usr.bin/ssh/packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 6c638501ac5..0b79d1677a2 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.188 2013/07/12 00:19:58 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.189 2013/11/08 00:39:15 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -985,7 +985,7 @@ packet_send2(void)
(type == SSH2_MSG_SERVICE_REQUEST) ||
(type == SSH2_MSG_SERVICE_ACCEPT)) {
debug("enqueue packet: %u", type);
- p = xmalloc(sizeof(*p));
+ p = xcalloc(1, sizeof(*p));
p->type = type;
memcpy(&p->payload, &active_state->outgoing_packet,
sizeof(Buffer));