From 72f22e9d2f4acd5edc573e4af1aa97f738facae3 Mon Sep 17 00:00:00 2001 From: inoguchi <> Date: Sun, 26 Apr 2020 01:59:27 +0000 Subject: 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@ --- src/usr.bin/openssl/s_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/usr.bin/openssl/s_client.c') 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 @@ -/* $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; -- cgit v1.2.3-55-g6feb