From: Scott Cantor Date: Thu, 10 Jan 2008 15:59:03 +0000 (+0000) Subject: Check for empty payload. X-Git-Tag: 2.0-rc1~4 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=4934d258a5aaca1d53a69e07941a0e77176c7880 Check for empty payload. --- diff --git a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp index c5f9209..47fc608 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp @@ -153,6 +153,8 @@ XMLObject* SAML2ArtifactDecoder::decode( // Now extract details from the payload and check that message. XMLObject* payload = response->getPayload(); + if (!payload) + throw BindingException("ArtifactResponse message did not contain a protocol message."); extractMessageDetails(*payload, genericRequest, samlconstants::SAML20P_NS, policy); policy.evaluate(*payload, &genericRequest);