[openssl] master update

dev at ddvo.net dev at ddvo.net
Thu Sep 17 12:28:05 UTC 2020


The branch master has been updated
       via  ebcae87f6b62ed9b79a1255dbb3c69c635cea4d8 (commit)
      from  1cae59d14b9e10ac81e5418c568d7d14cdf617f1 (commit)


- Log -----------------------------------------------------------------
commit ebcae87f6b62ed9b79a1255dbb3c69c635cea4d8
Author: Xiaofei Bai <xiaofei.bai at arm.com>
Date:   Tue Sep 15 01:59:02 2020 +0000

    FIX strncpy warning in apps/cmp.c.
    
    bugfix: #12872
    
    strncpy here has compiling warning of -Wstringop-truncation, change
    into BIO_snprintf as before.
    
    Change-Id: I362872c4ad328cadd4c7a5a5da3165655fa26c0d
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    Reviewed-by: David von Oheimb <david.von.oheimb at siemens.com>
    (Merged from https://github.com/openssl/openssl/pull/12889)

-----------------------------------------------------------------------

Summary of changes:
 apps/cmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/cmp.c b/apps/cmp.c
index 083425c08f..1137ed0a84 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -1839,7 +1839,7 @@ static int setup_client_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine)
         CMP_err("missing -tls_used option since -server URL indicates https");
         goto err;
     }
-    strncpy(server_port, port, sizeof(server_port));
+    BIO_snprintf(server_port, sizeof(server_port), "%s", port);
     used_path = opt_path != NULL ? opt_path : path;
     if (!OSSL_CMP_CTX_set1_server(ctx, server)
             || !OSSL_CMP_CTX_set_serverPort(ctx, portnum)


More information about the openssl-commits mailing list