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:01:12 +0000 (18:01 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6581)

crypto/bio/bss_log.c

index 0376919..4324f24 100644 (file)
@@ -200,7 +200,7 @@ static int slg_write(BIO *b, const char *in, int inl)
         BIOerr(BIO_F_SLG_WRITE, ERR_R_MALLOC_FAILURE);
         return 0;
     }
-    strncpy(buf, in, inl);
+    memcpy(buf, in, inl);
     buf[inl] = '\0';
 
     i = 0;