summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinoguchi <inoguchi@openbsd.org>2020-04-26 01:59:27 +0000
committerinoguchi <inoguchi@openbsd.org>2020-04-26 01:59:27 +0000
commitac7717a13588c92ce423b3daacb519ba5bff8ad2 (patch)
treea5568fc3a3a290374f7f4b155d7d716ca7282ba3
parentbcmbsc(4) (diff)
downloadwireguard-openbsd-ac7717a13588c92ce423b3daacb519ba5bff8ad2.tar.xz
wireguard-openbsd-ac7717a13588c92ce423b3daacb519ba5bff8ad2.zip
s_client: fix use of possibly uninitialized values
Set initial value to variable 'p' and 'pending'. Reported and fix requested from leonklingele by GitHub pull request. https://github.com/libressl-portable/portable/issues/577 https://github.com/libressl-portable/openbsd/pull/114 ok bcook@ jsing@ tb@
-rw-r--r--usr.bin/openssl/s_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/openssl/s_client.c b/usr.bin/openssl/s_client.c
index 02db7feac85..27516ae5dba 100644
--- a/usr.bin/openssl/s_client.c
+++ b/usr.bin/openssl/s_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_client.c,v 1.43 2020/04/19 17:05:55 jsing Exp $ */
+/* $OpenBSD: s_client.c,v 1.44 2020/04/26 01:59:27 inoguchi Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -293,7 +293,7 @@ s_client_main(int argc, char **argv)
{
unsigned int off = 0, clr = 0;
SSL *con = NULL;
- int s, k, p, pending, state = 0, af = AF_UNSPEC;
+ int s, k, p = 0, pending = 0, state = 0, af = AF_UNSPEC;
char *cbuf = NULL, *sbuf = NULL, *mbuf = NULL, *pbuf = NULL;
int cbuf_len, cbuf_off;
int sbuf_len, sbuf_off;