xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit e7e6ef7e7afac217f2c436d9cc2c8cb22082a515 Author: Daniel Lee <[email protected]> AuthorDate: Sat Nov 8 20:43:20 2025 -0600 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Thu Nov 13 19:51:59 2025 +0100 tdf#163691 Replace memcpy() with std::copy() Change-Id: Ia95bf6e5fbd5b3d2986bd608eb85a95b4c319657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193638 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <[email protected]> diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 071b194ff0dc..5e81e559ebe9 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -118,7 +118,7 @@ static char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*ar sal_Int32 nLen = aPassword.getLength(); char* pPassword = static_cast<char*>(PORT_Alloc( nLen+1 ) ); pPassword[nLen] = 0; - memcpy( pPassword, aPassword.getStr(), nLen ); + std::copy( aPassword.getStr(), aPassword.getStr() + nLen, pPassword ); return pPassword; } return nullptr;
