]> git.pld-linux.org Git - packages/parted.git/blame - 0014-parted-Fix-crash-with-name-command-and-no-disklabel-.patch
- release 5
[packages/parted.git] / 0014-parted-Fix-crash-with-name-command-and-no-disklabel-.patch
CommitLineData
c886eb9d
AM
1From f5c628dd51c7d77ff939554425159ab6e8aef1c0 Mon Sep 17 00:00:00 2001
2From: "Brian C. Lane" <bcl@redhat.com>
3Date: Mon, 13 Jul 2015 16:43:11 -0700
4Subject: [PATCH] parted: Fix crash with name command and no disklabel
5 (#1226067)
6
7A typo (the last I think) from commit 7eac058 wasn't properly checking
8the result of ped_disk_new so it could crash if there was no disklabel
9on the device.
10---
11 parted/parted.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/parted/parted.c b/parted/parted.c
15index 2678554..a9426c4 100644
16--- a/parted/parted.c
17+++ b/parted/parted.c
18@@ -860,7 +860,7 @@ do_name (PedDevice** dev, PedDisk** diskp)
19
20 if (!*diskp)
21 *diskp = ped_disk_new (*dev);
22- if (!diskp)
23+ if (!*diskp)
24 goto error;
25
26 if (!command_line_get_partition (_("Partition number?"), *diskp, &part))
27--
282.4.3
29
This page took 0.385046 seconds and 4 git commands to generate.