[parted-devel] [PATCH 2/2] Fix end_input usage in do_resizepart
Brian C. Lane
bcl at redhat.com
Fri Oct 18 21:42:12 BST 2019
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.21.0
More information about the parted-devel
mailing list