projects
/
shibboleth
/
cpp-opensaml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CPPXT-104 - Add exception handling to integer conversions
[shibboleth/cpp-opensaml.git]
/
saml
/
binding
/
impl
/
ArtifactMap.cpp
diff --git
a/saml/binding/impl/ArtifactMap.cpp
b/saml/binding/impl/ArtifactMap.cpp
index
c63c57a
..
e4bae0e
100644
(file)
--- 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) {
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;
}
if (!m_artifactTTL)
m_artifactTTL = 180;
}