parted/0004-Fix-end_input-usage-in-do_resizepart.patch

35 lines
1.1 KiB
Diff
Raw Normal View History

From ca845aeeddb17343c9289816833ca352f7c0d87b Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Tue, 23 Apr 2019 13:52:25 -0700
Subject: [PATCH 4/4] Fix end_input usage in do_resizepart
It needs to be set to NULL, since it may not get set by the call to
command_line_get_sector
---
parted/parted.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parted/parted.c b/parted/parted.c
index 9dcdb05..df0c7ed 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -1545,6 +1545,7 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)
PedGeometry *range_end = NULL;
PedConstraint* constraint;
int rc = 0;
+ char* end_input = NULL;
if (!disk) {
disk = ped_disk_new (*dev);
@@ -1565,7 +1566,6 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)
start = part->geom.start;
end = oldend = part->geom.end;
- char *end_input;
if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, &end_input))
goto error;
_adjust_end_if_iec(&start, &end, range_end, end_input);
--
2.23.0