summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-04-17 13:25:52 +0000
committerdjm <djm@openbsd.org>2015-04-17 13:25:52 +0000
commit18e491e7bf453b89cdd65c6b6a998ffdb86a12ea (patch)
tree83e18c4dc672c16ce70914ca83b0a388a2129a24
parentuse error/logit/fatal instead of fprintf(stderr, ...) and exit(0), (diff)
downloadwireguard-openbsd-18e491e7bf453b89cdd65c6b6a998ffdb86a12ea.tar.xz
wireguard-openbsd-18e491e7bf453b89cdd65c6b6a998ffdb86a12ea.zip
don't try to cleanup NULL KEX proposals in kex_prop_free();
found by Jukka Taimisto and Markus Hietava
-rw-r--r--usr.bin/ssh/kex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c
index d5d7e5cc48b..b328e5f0dbe 100644
--- a/usr.bin/ssh/kex.c
+++ b/usr.bin/ssh/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.105 2015/01/30 00:22:25 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.106 2015/04/17 13:25:52 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -210,6 +210,8 @@ kex_prop_free(char **proposal)
{
u_int i;
+ if (proposal == NULL)
+ return;
for (i = 0; i < PROPOSAL_MAX; i++)
free(proposal[i]);
free(proposal);