diff --git a/0001-coverity-54448-Uninitialized-scalar-field.patch b/0001-coverity-54448-Uninitialized-scalar-field.patch new file mode 100644 index 0000000..536661a --- /dev/null +++ b/0001-coverity-54448-Uninitialized-scalar-field.patch @@ -0,0 +1,26 @@ +From 9ef8ed8bdbe2c9756115c7d3e98c7180bb63fd0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 25 Sep 2014 10:38:35 +0100 +Subject: [PATCH] coverity#54448 Uninitialized scalar field + +--- + src/liborcus/xls_xml_context.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp +index 01f5dc9..abdd478 100644 +--- a/src/liborcus/xls_xml_context.cpp ++++ b/src/liborcus/xls_xml_context.cpp +@@ -141,7 +141,8 @@ xls_xml_context::xls_xml_context(session_context& session_cxt, const tokens& tok + xml_context_base(session_cxt, tokens), + mp_factory(factory), + mp_cur_sheet(NULL), +- m_cur_row(0), m_cur_col(0), m_cur_cell_type(ct_unknown) ++ m_cur_row(0), m_cur_col(0), m_cur_cell_type(ct_unknown), ++ m_cur_cell_value(std::numeric_limits::quiet_NaN()) + { + } + +-- +2.3.5 + diff --git a/0001-do-not-let-main-throw.patch b/0001-do-not-let-main-throw.patch new file mode 100644 index 0000000..c94dc06 --- /dev/null +++ b/0001-do-not-let-main-throw.patch @@ -0,0 +1,52 @@ +From da5d99c57ecdf54b40c248a109969021b70f5a38 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 4 May 2015 17:49:37 +0200 +Subject: [PATCH] do not let main() throw + +--- + src/orcus_detect_main.cpp | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +diff --git a/src/orcus_detect_main.cpp b/src/orcus_detect_main.cpp +index 2a9f082..2f4110f 100644 +--- a/src/orcus_detect_main.cpp ++++ b/src/orcus_detect_main.cpp +@@ -16,22 +16,14 @@ + using namespace orcus; + using namespace std; + +-int main(int argc, char** argv) ++int main(int argc, char** argv) try + { + if (argc != 2) + return EXIT_FAILURE; + + const char* filepath = argv[1]; + string strm; +- try +- { +- load_file_content(filepath, strm); +- } +- catch (const general_error& e) +- { +- cerr << e.what() << endl; +- return EXIT_FAILURE; +- } ++ load_file_content(filepath, strm); + + if (strm.empty()) + { +@@ -67,4 +59,10 @@ int main(int argc, char** argv) + + return EXIT_SUCCESS; + } ++catch (const general_error& e) ++{ ++ cerr << e.what() << endl; ++ return EXIT_FAILURE; ++} ++ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +-- +2.3.5 + diff --git a/liborcus.spec b/liborcus.spec index 15b3142..a964391 100644 --- a/liborcus.spec +++ b/liborcus.spec @@ -12,6 +12,8 @@ License: MPLv2.0 URL: https://gitlab.com/orcus/orcus Source: http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz Patch0: liborcus-0.7.0-iostream.patch +Patch1: 0001-coverity-54448-Uninitialized-scalar-field.patch +Patch2: 0001-do-not-let-main-throw.patch BuildRequires: boost-devel %if %{with convtools}