diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-19 08:21:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-19 08:32:23 +0200 |
commit | 365f2e9054c59da1515c52fe8852216ce678cf38 (patch) | |
tree | 01e473fd06efcadbc20870d48272d466d5cb7484 | |
parent | 90717e7d36e3ace7030efdc5007f086beaaeb52f (diff) |
cid#1374076 uncaught exception
Change-Id: Ifdbfc9f905f2ed7778830a0f2cc114d27feb36da
-rw-r--r-- | xmlsecurity/source/pdfio/pdfdocument.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 3b01578ec777..6e807a4d4cb1 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -1380,7 +1380,15 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, PDFObjectElement* pSignat // Then convert this string to a local UNO DateTime. util::DateTime aUNODateTime; - utl::ISO8601parseDateTime(aBuffer.toString(), aUNODateTime); + try + { + utl::ISO8601parseDateTime(aBuffer.toString(), aUNODateTime); + } + catch (const std::length_error&) + { + SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: failed to parse signature date string"); + return false; + } DateTime aDateTime(aUNODateTime); aDateTime.ConvertToLocalTime(); rInformation.stDateTime = aDateTime.GetUNODateTime(); |