From: Scott Cantor Date: Sun, 5 Jul 2015 19:12:30 +0000 (+0000) Subject: CPPXT-104 - Add exception handling to integer conversions X-Git-Tag: 2.5.5~7 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=ec145bf31d59d23bbf63cdc39ffeb172ed29d67d CPPXT-104 - Add exception handling to integer conversions --- diff --git a/saml/binding/impl/ArtifactMap.cpp b/saml/binding/impl/ArtifactMap.cpp index c63c57a..e4bae0e 100644 --- a/saml/binding/impl/ArtifactMap.cpp +++ b/saml/binding/impl/ArtifactMap.cpp @@ -190,7 +190,12 @@ ArtifactMap::ArtifactMap(const DOMElement* e, xmltooling::StorageService* storag const XMLCh* TTL = e->getAttributeNS(nullptr, artifactTTL); if (TTL) { - m_artifactTTL = XMLString::parseInt(TTL); + try { + m_artifactTTL = XMLString::parseInt(TTL); + } + catch (XMLException&) { + m_artifactTTL = 0; + } if (!m_artifactTTL) m_artifactTTL = 180; }