Fix a new gcc-9 warning [-Wstringop-truncation]
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sat, 23 Jun 2018 20:17:19 +0000 (22:17 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 24 Jun 2018 16:04:45 +0000 (18:04 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6581)

(cherry picked from commit dc6c374bdb4872f6d5d727e73a2ed834e972842c)

crypto/bio/bss_log.c

index 5221acc2e3bc971e3f5493326ec1e669c0b698c0..83dae643385c0f7fc0fb42808887fdc989414a69 100644 (file)
@@ -196,7 +196,7 @@ static int slg_write(BIO *b, const char *in, int inl)
     if ((buf = OPENSSL_malloc(inl + 1)) == NULL) {
         return (0);
     }
-    strncpy(buf, in, inl);
+    memcpy(buf, in, inl);
     buf[inl] = '\0';
 
     i = 0;