[util-linux] 2.24-2: #1031262

kzak kzak at fedoraproject.org
Mon Nov 18 10:43:16 UTC 2013


commit 120f8c135118f9ae5240005ab0e102f8d489bedb
Author: Karel Zak <kzak at redhat.com>
Date:   Mon Nov 18 11:38:33 2013 +0100

    2.24-2: #1031262

 2.25-lsblk-D-segfault.patch |   45 +++++++++++++++++++++++++++++++++++++++++++
 util-linux.spec             |    7 +++++-
 2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/2.25-lsblk-D-segfault.patch b/2.25-lsblk-D-segfault.patch
new file mode 100644
index 0000000..b8d0531
--- /dev/null
+++ b/2.25-lsblk-D-segfault.patch
@@ -0,0 +1,45 @@
+From 71d842c01992b3678de4da4773ed54f08c0ab4f6 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Mon, 18 Nov 2013 11:27:35 +0100
+Subject: [PATCH] lsblk: fix -D segfault
+
+References: https://bugzilla.redhat.com/show_bug.cgi?id=1031262
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ misc-utils/lsblk.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index 9f7f1b6..9b53be3 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -903,7 +903,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line
+ 		if (cxt->discard && p)
+ 			tt_line_set_data(ln, col, p);
+ 		else
+-			tt_line_set_data(ln, col, "0");
++			tt_line_set_data(ln, col, xstrdup("0"));
+ 		break;
+ 	case COL_DGRAN:
+ 		if (lsblk->bytes)
+@@ -936,7 +936,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line
+ 		if (cxt->discard && p)
+ 			tt_line_set_data(ln, col, p);
+ 		else
+-			tt_line_set_data(ln, col, "0");
++			tt_line_set_data(ln, col, xstrdup("0"));
+ 		break;
+ 	case COL_WSAME:
+ 		if (lsblk->bytes)
+@@ -948,7 +948,7 @@ static void set_tt_data(struct blkdev_cxt *cxt, int col, int id, struct tt_line
+ 					   "queue/write_same_max_bytes", &x) == 0)
+ 				p = size_to_human_string(SIZE_SUFFIX_1LETTER, x);
+ 		}
+-		tt_line_set_data(ln, col, p ? p : "0");
++		tt_line_set_data(ln, col, p ? p : xstrdup("0"));
+ 		break;
+ 	};
+ }
+-- 
+1.8.3.1
+
diff --git a/util-linux.spec b/util-linux.spec
index 072706c..d2ad458 100644
--- a/util-linux.spec
+++ b/util-linux.spec
@@ -2,7 +2,7 @@
 Summary: A collection of basic system utilities
 Name: util-linux
 Version: 2.24
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
 Group: System Environment/Base
 URL: http://en.wikipedia.org/wiki/Util-linux
@@ -79,6 +79,8 @@ Patch0: 2.23-login-lastlog-create.patch
 
 # backport from v2.25: 1022217 - fdisk mishandles GPT corruption
 Patch1: 2.25-libfdisk-gpt-recovery.patch
+# backport from v2.25 (or v2.24.1) #1031262 - lsblk -D segfault
+Patch2: 2.25-lsblk-D-segfault.patch
 
 %description
 The util-linux package contains a large variety of low-level system
@@ -814,6 +816,9 @@ fi
 %{_libdir}/python*/site-packages/libmount/*
 
 %changelog
+* Mon Nov 18 2013 Karel Zak <kzak at redhat.com> 2.24-2
+- fix #1031262 - lsblk -D segfault
+
 * Wed Oct 23 2013 Karel Zak <kzak at redhat.com> 2.24-1
 - upgrade to upstream release v2.24
 - remove nologin (merged upstream)


More information about the scm-commits mailing list