Fix a new gcc-9 warning [-Wstringop-truncation]

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6581)
This commit is contained in:
Bernd Edlinger 2018-06-23 22:17:19 +02:00
parent f223e8fd1c
commit dc6c374bdb

View 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;