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