summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_client.c
diff options
context:
space:
mode:
authorinoguchi <>2020-04-26 01:59:27 +0000
committerinoguchi <>2020-04-26 01:59:27 +0000
commit72f22e9d2f4acd5edc573e4af1aa97f738facae3 (patch)
tree81161da38426bf8b2937aa9c2456739c1e0f7a9e /src/usr.bin/openssl/s_client.c
parentca06ffcbffc40db45bde9ad4ab43058ba476e689 (diff)
downloadopenbsd-72f22e9d2f4acd5edc573e4af1aa97f738facae3.tar.gz
openbsd-72f22e9d2f4acd5edc573e4af1aa97f738facae3.tar.bz2
openbsd-72f22e9d2f4acd5edc573e4af1aa97f738facae3.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@
Diffstat (limited to 'src/usr.bin/openssl/s_client.c')
-rw-r--r--src/usr.bin/openssl/s_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c
index 02db7feac8..27516ae5db 100644
--- a/src/usr.bin/openssl/s_client.c
+++ b/src/usr.bin/openssl/s_client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s_client.c,v 1.43 2020/04/19 17:05:55 jsing Exp $ */ 1/* $OpenBSD: s_client.c,v 1.44 2020/04/26 01:59:27 inoguchi Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -293,7 +293,7 @@ s_client_main(int argc, char **argv)
293{ 293{
294 unsigned int off = 0, clr = 0; 294 unsigned int off = 0, clr = 0;
295 SSL *con = NULL; 295 SSL *con = NULL;
296 int s, k, p, pending, state = 0, af = AF_UNSPEC; 296 int s, k, p = 0, pending = 0, state = 0, af = AF_UNSPEC;
297 char *cbuf = NULL, *sbuf = NULL, *mbuf = NULL, *pbuf = NULL; 297 char *cbuf = NULL, *sbuf = NULL, *mbuf = NULL, *pbuf = NULL;
298 int cbuf_len, cbuf_off; 298 int cbuf_len, cbuf_off;
299 int sbuf_len, sbuf_off; 299 int sbuf_len, sbuf_off;