parted: backport bugfix patches

parted: backport bugfix patches

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
This commit is contained in:
Zhiqiang Liu 2020-07-12 15:38:58 +08:00
parent 90f4c596ea
commit ad37e60c6b
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From bd7a18b1bfe44ccdb2733d14bdd493b823c546bc 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] 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

View File

@ -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 <lzhq28@mail.ustc.edu.cn> - 3.3-6
- backport bugfix patches
* Sun Jul 5 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 3.3-5
- remove useless readme files