Blame SOURCES/0008-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch

7fd79c
From 624a8b14af7d358782ecc12627c84da72c28aeff Mon Sep 17 00:00:00 2001
7fd79c
From: Phillip Susi <psusi@ubuntu.com>
7fd79c
Date: Tue, 13 Jan 2015 11:05:48 -0500
7fd79c
Subject: [PATCH 08/11] parted: don't crash in disk_set when disk label not
7fd79c
 found
7fd79c
7fd79c
Due to a typeo in commit 7eac058 "parted: don't reload partition
7fd79c
table on every command", the disk_set command would crash if
7fd79c
a disk label was not found.
7fd79c
---
7fd79c
 NEWS            | 2 ++
7fd79c
 parted/parted.c | 2 +-
7fd79c
 2 files changed, 3 insertions(+), 1 deletion(-)
7fd79c
7fd79c
diff --git a/NEWS b/NEWS
7fd79c
index da7db50..10c9a6e 100644
7fd79c
--- a/NEWS
7fd79c
+++ b/NEWS
7fd79c
@@ -4,6 +4,8 @@ GNU parted NEWS                                    -*- outline -*-
7fd79c
 
7fd79c
 ** Bug Fixes
7fd79c
 
7fd79c
+  Don't crash in the disk_set command when a disk label is not found
7fd79c
+
7fd79c
   libparted-fs-resize: Prevent crash resizing FAT16 file systems.
7fd79c
 
7fd79c
 
7fd79c
diff --git a/parted/parted.c b/parted/parted.c
7fd79c
index f27a035..2678554 100644
7fd79c
--- a/parted/parted.c
7fd79c
+++ b/parted/parted.c
7fd79c
@@ -1684,7 +1684,7 @@ do_disk_set (PedDevice** dev, PedDisk** diskp)
7fd79c
 
7fd79c
     if (!*diskp)
7fd79c
             *diskp = ped_disk_new (*dev);
7fd79c
-    if (!diskp)
7fd79c
+    if (!*diskp)
7fd79c
         goto error;
7fd79c
 
7fd79c
     if (!command_line_get_disk_flag (_("Flag to Invert?"), *diskp, &flag))
7fd79c
-- 
7fd79c
2.1.0
7fd79c