[med-svn] [mia] 01/04: Add patches to secure locking and help-xml output
Gert Wollny
gert-guest at moszumanska.debian.org
Thu Nov 17 07:07:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
gert-guest pushed a commit to branch master
in repository mia.
commit 21c0150b84467ba23437ce0c51b8a5dcf02ff6cc
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Tue Nov 15 09:32:14 2016 +0000
Add patches to secure locking and help-xml output
---
.../patches/mia_243_check_help_xml_success.patch | 30 ++++++++++++++++++++++
debian/patches/mia_243_scoped_lock_no_copy.patch | 21 +++++++++++++++
debian/patches/series | 2 ++
3 files changed, 53 insertions(+)
diff --git a/debian/patches/mia_243_check_help_xml_success.patch b/debian/patches/mia_243_check_help_xml_success.patch
new file mode 100644
index 0000000..e2109bd
--- /dev/null
+++ b/debian/patches/mia_243_check_help_xml_success.patch
@@ -0,0 +1,30 @@
+commit 0e5f33ecd0548d575df296ec94e131a536fea94a
+Author: Gert Wollny <gw.fossdev at gmail.com>
+Date: Mon Nov 14 13:13:19 2016 +0100
+
+ Add error handling to help-xml output
+
+diff --git a/mia/core/cmdlineparser.cc b/mia/core/cmdlineparser.cc
+index b820b07..31e679f 100644
+--- a/mia/core/cmdlineparser.cc
++++ b/mia/core/cmdlineparser.cc
+@@ -58,7 +58,8 @@ using std::ostream;
+ using std::ofstream;
+ using std::ostringstream;
+ using std::string;
+-using std::invalid_argument;
++using std::invalid_argument;
++using std::runtime_error;
+ using std::logic_error;
+ using std::vector;
+ using std::map;
+@@ -394,6 +395,9 @@ void CCmdOptionListData::print_help_xml(const char *name_help, const CPluginHand
+ ofstream xmlfile(help_xml.c_str());
+ xmlfile << doc->write_to_string_formatted();
+ xmlfile << std::endl;
++ if (!xmlfile.good()) {
++ throw create_exception<runtime_error>("Unable to write '", help_xml, "'");
++ }
+ }else{
+ std::cout << doc->write_to_string_formatted();
+ }
diff --git a/debian/patches/mia_243_scoped_lock_no_copy.patch b/debian/patches/mia_243_scoped_lock_no_copy.patch
new file mode 100644
index 0000000..2073f31
--- /dev/null
+++ b/debian/patches/mia_243_scoped_lock_no_copy.patch
@@ -0,0 +1,21 @@
+commit 433cdc9edcaeffef732b95c1e1fdcdc830b5be26
+Author: Gert Wollny <gw.fossdev at gmail.com>
+Date: Sun Nov 13 14:01:16 2016 +0100
+
+ remove copy from scoped lock
+
+diff --git a/mia/core/parallelcxx11.hh b/mia/core/parallelcxx11.hh
+index c5354a3..b308343 100644
+--- a/mia/core/parallelcxx11.hh
++++ b/mia/core/parallelcxx11.hh
+@@ -52,6 +52,10 @@ public:
+ m_mutex.lock();
+ own_lock = true;
+ };
++
++ TScopedLock(const TScopedLock<Mutex>& other) = delete;
++ TScopedLock& operator = (const TScopedLock<Mutex>& other) = delete;
++
+ ~TScopedLock(){
+ if (own_lock)
+ m_mutex.unlock();
diff --git a/debian/patches/series b/debian/patches/series
index 8d6e592..ba4019e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
path_max.patch
+mia_243_scoped_lock_no_copy.patch
+mia_243_check_help_xml_success.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/mia.git
More information about the debian-med-commit
mailing list