summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2015-05-08 03:25:08 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2015-05-08 03:25:08 +0000
commit2434939def3e065657484a006444f610885c6b4a (patch)
tree399b799a97082328d8515759ca3e584fa9372b6e /usr.bin
parenta2d98681eaf05ce5bd51d653c63066268e769944 (diff)
Use xcalloc for permitted_adm_opens instead of xmalloc to ensure it's zeroed.
Fixes post-auth crash with permitopen=none. bz#2355, ok djm@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 5205da99ae9..0b597e4b583 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.342 2015/04/24 01:36:00 deraadt Exp $ */
+/* $OpenBSD: channels.c,v 1.343 2015/05/08 03:25:07 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3498,7 +3498,7 @@ void
channel_disable_adm_local_opens(void)
{
channel_clear_adm_permitted_opens();
- permitted_adm_opens = xmalloc(sizeof(*permitted_adm_opens));
+ permitted_adm_opens = xcalloc(sizeof(*permitted_adm_opens), 1);
permitted_adm_opens[num_adm_permitted_opens].host_to_connect = NULL;
num_adm_permitted_opens = 1;
}