From: dtucker Date: Fri, 8 May 2015 03:25:07 +0000 (+0000) Subject: Use xcalloc for permitted_adm_opens instead of xmalloc to ensure it's zeroed. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ab5cc4e26e5540081a1c5168f8df0f805a68b0a0;p=openbsd 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@ --- 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 * Copyright (c) 1995 Tatu Ylonen , 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; }