[cpp-opensaml] branch master updated: Add null guards to encoder c'tors.
Scott Cantor
cantor.2 at osu.edu
Wed Feb 14 14:46:13 EST 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=6ddc35714f1b51836c6d23aac1aa304979501b20
The following commit(s) were added to refs/heads/master by this push:
new 6ddc357 Add null guards to encoder c'tors.
6ddc357 is described below
commit 6ddc35714f1b51836c6d23aac1aa304979501b20
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 14 14:45:54 2018 -0500
Add null guards to encoder c'tors.
---
saml/saml1/binding/impl/SAML1POSTEncoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2ECPEncoder.cpp | 2 +-
saml/saml2/binding/impl/SAML2POSTEncoder.cpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
index 95a1267..aee3491 100644
--- a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
+++ b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp
@@ -93,7 +93,7 @@ SAML1POSTEncoder::SAML1POSTEncoder(const DOMElement* e)
static const XMLCh _template[] = UNICODE_LITERAL_8(t, e, m, p, l, a, t, e);
- const DOMNamedNodeMap* attributes = e->getAttributes();
+ const DOMNamedNodeMap* attributes = e ? e->getAttributes() : nullptr;
XMLSize_t size = attributes ? attributes->getLength() : 0;
for (XMLSize_t i = 0; i < size; ++i) {
const DOMNode* attr = attributes->item(i);
diff --git a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp
index 6735f94..2e5c8ee 100644
--- a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp
@@ -96,7 +96,7 @@ SAML2ArtifactEncoder::SAML2ArtifactEncoder(const DOMElement* e)
static const XMLCh postArtifact[] = UNICODE_LITERAL_12(p, o, s, t, A, r, t, i, f, a, c, t);
static const XMLCh _template[] = UNICODE_LITERAL_8(t, e, m, p, l, a, t, e);
- const DOMNamedNodeMap* attributes = e->getAttributes();
+ const DOMNamedNodeMap* attributes = e ? e->getAttributes() : nullptr;
XMLSize_t size = attributes ? attributes->getLength() : 0;
bool post = false;
diff --git a/saml/saml2/binding/impl/SAML2ECPEncoder.cpp b/saml/saml2/binding/impl/SAML2ECPEncoder.cpp
index 9f6545b..5ba1e43 100644
--- a/saml/saml2/binding/impl/SAML2ECPEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2ECPEncoder.cpp
@@ -97,7 +97,7 @@ SAML2ECPEncoder::SAML2ECPEncoder(const DOMElement* e)
// Fishy alert: we ignore the namespace and look for a matching DOM Attr node by name only.
// Can't use DOM 1 calls, so we have to walk the attribute list by hand.
- const DOMNamedNodeMap* attributes = e->getAttributes();
+ const DOMNamedNodeMap* attributes = e ? e->getAttributes() : nullptr;
XMLSize_t size = attributes ? attributes->getLength() : 0;
for (XMLSize_t i = 0; i < size; ++i) {
const DOMNode* attr = attributes->item(i);
diff --git a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp
index 0241839..4040b3f 100644
--- a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp
+++ b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp
@@ -100,7 +100,7 @@ SAML2POSTEncoder::SAML2POSTEncoder(const DOMElement* e, bool simple) : m_simple(
static const XMLCh _template[] = UNICODE_LITERAL_8(t, e, m, p, l, a, t, e);
- const DOMNamedNodeMap* attributes = e->getAttributes();
+ const DOMNamedNodeMap* attributes = e ? e->getAttributes() : nullptr;
XMLSize_t size = attributes ? attributes->getLength() : 0;
for (XMLSize_t i = 0; i < size; ++i) {
const DOMNode* attr = attributes->item(i);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list