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 037691901755bb0cfea9def63788a3c8421d2e80..4324f24126818d768f5896ec717577de019b85a2 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;