[openssl-dev] [openssl.org #4289] OpenSSL 1.0.2f serious bug in Win32 makefiles, easy to fix, solution provided

Joey Yandle via RT rt at openssl.org
Wed Feb 3 19:41:48 UTC 2016


> And verify attached diff and report back.

The diff works perfectly on master, but exposed a new bug (bare 
snprintf).  The following patch fixes it.  I can make a PR (or add it to 
my existing PR #512) if you'd like.

diff --git a/test/ssltest.c b/test/ssltest.c
index 5d6700e..9cd2a53 100644
--- a/test/ssltest.c
+++ b/test/ssltest.c
@@ -1890,7 +1890,7 @@ int doit_localhost(SSL *s_ssl, SSL *c_ssl, int 
family, long count,
      if (BIO_do_accept(acpt) <= 0)
          goto err;

-    snprintf(addr_str, sizeof(addr_str), ":%s", BIO_get_accept_port(acpt));
+    BIO_snprintf(addr_str, sizeof(addr_str), ":%s", 
BIO_get_accept_port(acpt));

      client = BIO_new_connect(addr_str);
      BIO_set_conn_ip_family(client, family);




More information about the openssl-dev mailing list