[cpp-opensaml COMMIT] in /branches/REL_2/saml: SAMLConfig.cpp binding/impl/SecurityPolicy.cpp

noreply at shibboleth.net noreply at shibboleth.net
Mon Sep 12 17:34:43 BST 2011


Author: scantor
Date: Mon Sep 12 17:34:43 2011
New Revision: 670

URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=670&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-392

Modified:
    branches/REL_2/saml/SAMLConfig.cpp
    branches/REL_2/saml/binding/impl/SecurityPolicy.cpp

Modified: branches/REL_2/saml/SAMLConfig.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/SAMLConfig.cpp?rev=670&r1=669&r2=670&view=diff
==============================================================================
--- branches/REL_2/saml/SAMLConfig.cpp (original)
+++ branches/REL_2/saml/SAMLConfig.cpp Mon Sep 12 17:34:43 2011
@@ -234,8 +234,8 @@
 void SAMLInternalConfig::generateRandomBytes(std::string& buf, unsigned int len)
 {
     buf.erase();
-    auto_ptr<unsigned char> hold(new unsigned char[len]);
-    generateRandomBytes(hold.get(),len);
+    auto_arrayptr<unsigned char> hold(new unsigned char[len]);
+    generateRandomBytes(const_cast<unsigned char*>(hold.get()), len);
     for (unsigned int i=0; i<len; i++)
         buf+=(hold.get())[i];
 }

Modified: branches/REL_2/saml/binding/impl/SecurityPolicy.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/binding/impl/SecurityPolicy.cpp?rev=670&r1=669&r2=670&view=diff
==============================================================================
--- branches/REL_2/saml/binding/impl/SecurityPolicy.cpp (original)
+++ branches/REL_2/saml/binding/impl/SecurityPolicy.cpp Mon Sep 12 17:34:43 2011
@@ -106,6 +106,7 @@
 
 SecurityPolicy::~SecurityPolicy()
 {
+    delete m_role;
     delete m_metadataCriteria;
     delete m_issuer;
 }



More information about the commits mailing list