]> git.pld-linux.org Git - packages/parted.git/blob - 0008-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch
- release 6 (by relup.sh)
[packages/parted.git] / 0008-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch
1 From 624a8b14af7d358782ecc12627c84da72c28aeff Mon Sep 17 00:00:00 2001
2 From: Phillip Susi <psusi@ubuntu.com>
3 Date: Tue, 13 Jan 2015 11:05:48 -0500
4 Subject: [PATCH 08/11] parted: don't crash in disk_set when disk label not
5  found
6
7 Due to a typeo in commit 7eac058 "parted: don't reload partition
8 table on every command", the disk_set command would crash if
9 a disk label was not found.
10 ---
11  NEWS            | 2 ++
12  parted/parted.c | 2 +-
13  2 files changed, 3 insertions(+), 1 deletion(-)
14
15 diff --git a/NEWS b/NEWS
16 index da7db50..10c9a6e 100644
17 --- a/NEWS
18 +++ b/NEWS
19 @@ -4,6 +4,8 @@ GNU parted NEWS                                    -*- outline -*-
20  
21  ** Bug Fixes
22  
23 +  Don't crash in the disk_set command when a disk label is not found
24 +
25    libparted-fs-resize: Prevent crash resizing FAT16 file systems.
26  
27  
28 diff --git a/parted/parted.c b/parted/parted.c
29 index f27a035..2678554 100644
30 --- a/parted/parted.c
31 +++ b/parted/parted.c
32 @@ -1684,7 +1684,7 @@ do_disk_set (PedDevice** dev, PedDisk** diskp)
33  
34      if (!*diskp)
35              *diskp = ped_disk_new (*dev);
36 -    if (!diskp)
37 +    if (!*diskp)
38          goto error;
39  
40      if (!command_line_get_disk_flag (_("Flag to Invert?"), *diskp, &flag))
41 -- 
42 2.1.0
43
This page took 0.026242 seconds and 3 git commands to generate.