summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-02-19 11:33:28 +0100
committerMichael Stahl <mstahl@redhat.com>2013-02-19 11:34:29 +0100
commit9a49ff646bdd27fb1355847828794b0a9df40e1d (patch)
treed9c3d5ed6d27ba4d2dd1f1640035016598087b7f /xmlsecurity
parent8ff09509d725ce18814d5d77794f227d0c72037b (diff)
nsscrypto_initializer: MSVC does not support C99 dynamic arrays
Change-Id: I407b2308756b46fbf0920881fc20972b486819b7
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx14
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 ;
}