From ad37e60c6b47c7ca7404766d4830da176f297c0d Mon Sep 17 00:00:00 2001 From: Zhiqiang Liu Date: Sun, 12 Jul 2020 15:38:58 +0800 Subject: [PATCH] parted: backport bugfix patches parted: backport bugfix patches Signed-off-by: Zhiqiang Liu --- ...Fix-end_input-usage-in-do_resizepart.patch | 34 +++++++++++++++++++ parted.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0004-Fix-end_input-usage-in-do_resizepart.patch diff --git a/0004-Fix-end_input-usage-in-do_resizepart.patch b/0004-Fix-end_input-usage-in-do_resizepart.patch new file mode 100644 index 0000000..79ed9e5 --- /dev/null +++ b/0004-Fix-end_input-usage-in-do_resizepart.patch @@ -0,0 +1,34 @@ +From bd7a18b1bfe44ccdb2733d14bdd493b823c546bc Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Tue, 23 Apr 2019 13:52:25 -0700 +Subject: [PATCH] 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); +-- +1.8.3.1 + diff --git a/parted.spec b/parted.spec index 7bfd75f..b1a4f04 100644 --- a/parted.spec +++ b/parted.spec @@ -14,7 +14,7 @@ Summary: The GNU disk partition manipulation program Name: parted Version: 3.3 -Release: 5 +Release: 6 URL: https://www.gnu.org/software/parted/ Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig @@ -29,6 +29,7 @@ Patch0: 0000-Switch-gpt-header-move-and-msdos-overlap-to-python3.patch Patch1: 0001-add-support-of-gpt_sync_mbr.patch Patch2: 0002-Add-extra-judgment-for-a-partition-created-success.patch Patch3: 0003-bugfix-parted-fix-failure-of-mklabel-gpt_sync_mbr.patch +Patch4: 0004-Fix-end_input-usage-in-do_resizepart.patch %description The GNU Parted program allows you to create, destroy, resize, move, @@ -113,6 +114,9 @@ fi %{_libdir}/pkgconfig/libparted*.pc %changelog +* Sun Jul 12 2020 Zhiqiang Liu - 3.3-6 +- backport bugfix patches + * Sun Jul 5 2020 Zhiqiang Liu - 3.3-5 - remove useless readme files -- Gitee