diff options
Diffstat (limited to 'xmlsecurity/source/xmlsec/nss/nssinitializer.cxx')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 988d362a6c7b..f9bc48799730 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -62,6 +62,8 @@ #include "digestcontext.hxx" #include "ciphercontext.hxx" +#include <boost/scoped_array.hpp> + #include <nspr.h> #include <cert.h> #include <nss.h> @@ -282,9 +284,9 @@ bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContex int errlen = PR_GetErrorTextLength(); if(errlen > 0) { - char error[errlen + 1]; - PR_GetErrorText(error); - xmlsec_trace("%s",error); + boost::scoped_array<char> const error(new char[errlen + 1]); + PR_GetErrorText(error.get()); + xmlsec_trace("%s", error.get()); } bSuccess = false; } @@ -299,9 +301,9 @@ bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContex int errlen = PR_GetErrorTextLength(); if(errlen > 0) { - char error[errlen + 1]; - PR_GetErrorText(error); - xmlsec_trace("%s",error); + boost::scoped_array<char> const error(new char[errlen + 1]); + PR_GetErrorText(error.get()); + xmlsec_trace("%s", error.get()); } return false ; } |