diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index 952cdf5e0b6b..a6758519b7cd 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -1925,7 +1925,8 @@ OUString GetSubjectName(PCCERT_CONTEXT pCertContext) } // Allocate memory for subject name. - LPTSTR szName = (LPTSTR)LocalAlloc(LPTR, dwData * sizeof(TCHAR)); + LPTSTR szName = static_cast( + LocalAlloc(LPTR, dwData * sizeof(TCHAR))); if (!szName) { SAL_WARN("svl.crypto", "ValidateSignature: Unable to allocate memory for subject name");