Blame SOURCES/0001-coverity-1259905-do-not-let-AbiDocument-parse-throw.patch
|
|
319190 |
From 2f372e8adf8e6b1f8cf70f08adddcf66be54d94a Mon Sep 17 00:00:00 2001
|
|
|
319190 |
From: David Tardon <dtardon@redhat.com>
|
|
|
319190 |
Date: Sat, 20 Dec 2014 18:40:45 +0100
|
|
|
319190 |
Subject: [PATCH] coverity#1259905 do not let AbiDocument::parse throw
|
|
|
319190 |
|
|
|
319190 |
This also fixes coverity#1259906 and coverity#1259907 .
|
|
|
319190 |
|
|
|
319190 |
Change-Id: I55d892517ac93ca43478d51d8e4a20c704ff6790
|
|
|
319190 |
---
|
|
|
319190 |
src/lib/AbiDocument.cpp | 7 ++++++-
|
|
|
319190 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
319190 |
|
|
|
319190 |
diff --git a/src/lib/AbiDocument.cpp b/src/lib/AbiDocument.cpp
|
|
|
319190 |
index b8ab661..23ff750 100644
|
|
|
319190 |
--- a/src/lib/AbiDocument.cpp
|
|
|
319190 |
+++ b/src/lib/AbiDocument.cpp
|
|
|
319190 |
@@ -110,7 +110,7 @@ is not protected
|
|
|
319190 |
\return A value that indicates whether the conversion was successful and in case it
|
|
|
319190 |
was not, it indicates the reason of the error
|
|
|
319190 |
*/
|
|
|
319190 |
-ABWAPI bool libabw::AbiDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *textInterface)
|
|
|
319190 |
+ABWAPI bool libabw::AbiDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *textInterface) try
|
|
|
319190 |
{
|
|
|
319190 |
ABW_DEBUG_MSG(("AbiDocument::parse\n"));
|
|
|
319190 |
if (!input)
|
|
|
319190 |
@@ -122,4 +122,9 @@ ABWAPI bool libabw::AbiDocument::parse(librevenge::RVNGInputStream *input, libre
|
|
|
319190 |
return true;
|
|
|
319190 |
return false;
|
|
|
319190 |
}
|
|
|
319190 |
+catch (...)
|
|
|
319190 |
+{
|
|
|
319190 |
+ return false;
|
|
|
319190 |
+}
|
|
|
319190 |
+
|
|
|
319190 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
|
|
|
319190 |
--
|
|
|
319190 |
2.3.5
|
|
|
319190 |
|