Control: tags 722989 + pending

Dear maintainer,

I've prepared an NMU for gsmartcontrol (versioned as 0.8.7-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards,

Stephen
diff -Nru gsmartcontrol-0.8.7/debian/changelog gsmartcontrol-0.8.7/debian/changelog
--- gsmartcontrol-0.8.7/debian/changelog	2013-05-31 15:58:29.000000000 +0200
+++ gsmartcontrol-0.8.7/debian/changelog	2014-09-12 08:42:32.000000000 +0200
@@ -1,3 +1,11 @@
+gsmartcontrol (0.8.7-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Handle empty sections in recent versions of smartmontools; thanks to
+    Francesco Presel for the patch. Closes: #722989.
+
+ -- Stephen Kitt <sk...@debian.org>  Fri, 12 Sep 2014 08:40:12 +0200
+
 gsmartcontrol (0.8.7-1) unstable; urgency=low
 
   * [314881d] Updated debian/watch
diff -Nru gsmartcontrol-0.8.7/debian/patches/compat_with_smartmontools_6.patch gsmartcontrol-0.8.7/debian/patches/compat_with_smartmontools_6.patch
--- gsmartcontrol-0.8.7/debian/patches/compat_with_smartmontools_6.patch	1970-01-01 01:00:00.000000000 +0100
+++ gsmartcontrol-0.8.7/debian/patches/compat_with_smartmontools_6.patch	2014-09-12 08:39:45.000000000 +0200
@@ -0,0 +1,22 @@
+Description: don't try to parse empty sections
+ Since smartmontools 6.0, the output is divided in sections regardless of the
+ drive having or not SMART capabilities; in the latter case the last section
+ is empty. In that case, just skip it (parsing empty sections causes a crash).
+Author: Francesco Presel <f.pre...@alice.it>
+Bug-Debian: http://bugs.debian.org/722989
+Last-Update: <2014-01-23>
+
+--- a/src/applib/smartctl_parser.cpp
++++ b/src/applib/smartctl_parser.cpp
+@@ -202,7 +202,10 @@
+ 			&& (section_start_pos = s.find("===", section_start_pos)) != std::string::npos) {
+ 
+ 		tmp_pos = s.find("\n", section_start_pos);  // works with \r\n too.
+-
++		if (tmp_pos == std::string::npos) { // empty section: skip
++			break;
++		}
++			
+ 		// trim is needed to remove potential \r in the end
+ 		std::string section_header = hz::string_trim_copy(s.substr(section_start_pos,
+ 				(tmp_pos == std::string::npos ? tmp_pos : (tmp_pos - section_start_pos)) ));
diff -Nru gsmartcontrol-0.8.7/debian/patches/series gsmartcontrol-0.8.7/debian/patches/series
--- gsmartcontrol-0.8.7/debian/patches/series	2013-05-31 15:58:29.000000000 +0200
+++ gsmartcontrol-0.8.7/debian/patches/series	2014-09-12 08:40:05.000000000 +0200
@@ -1,3 +1,4 @@
 01_use_su-to-root.patch
 02_fix_doc_install.patch
 03_gcc4.4.patch
+compat_with_smartmontools_6.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to