- fix #472502 - problem with fdisk and use +sectors for the end of

partition
This commit is contained in:
kzak 2008-11-21 14:51:48 +00:00
commit 2b9130c36b
2 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,30 @@
Upstream patch:
commit 5ea8931c95b2e0b1663f28591d2c721f07a88181
Author: Karel Zak <kzak@redhat.com>
Date: Thu Nov 13 23:08:34 2008 +0100
diff -up util-linux-ng-2.14.1/fdisk/fdisk.c.kzak util-linux-ng-2.14.1/fdisk/fdisk.c
--- util-linux-ng-2.14.1/fdisk/fdisk.c.kzak 2008-11-21 14:27:19.000000000 +0100
+++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-21 15:10:07.000000000 +0100
@@ -1193,7 +1193,8 @@ read_int(unsigned int low, unsigned int
*/
if (!display_in_cyl_units)
i *= heads * sectors;
- } else if (*(line_ptr + 1) == 'B' &&
+ } else if (*line_ptr &&
+ *(line_ptr + 1) == 'B' &&
*(line_ptr + 2) == '\0') {
/*
* 10^N
@@ -1206,7 +1207,8 @@ read_int(unsigned int low, unsigned int
absolute = 1000000000;
else
absolute = -1;
- } else if (*(line_ptr + 1) == '\0') {
+ } else if (*line_ptr &&
+ *(line_ptr + 1) == '\0') {
/*
* 2^N
*/

View file

@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux-ng
Version: 2.14.1
Release: 3%{?dist}
Release: 3.1%{?dist}
License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@ -101,6 +101,8 @@ Patch10: util-linux-ng-2.14-blockdev-rmpart.patch
Patch11: util-linux-ng-2.14-mount-file_t.patch
# 465761: mount manpage is missing uid/gid mount options for tmpfs (upstream patch)
Patch12: util-linux-ng-2.14-mount-man-tmpfs.patch
# 472502: Problem with fdisk and use +sectors for the end of partition (upstream patch)
Patch13: util-linux-ng-2.14-fdisk-cylinder.patch
%description
The util-linux-ng package contains a large variety of low-level system
@ -124,6 +126,7 @@ cp %{SOURCE8} %{SOURCE9} .
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%build
unset LINGUAS || :
@ -516,6 +519,9 @@ exit 0
/sbin/losetup
%changelog
* Fri Nov 21 2008 Karel Zak <kzak@redhat.com> 2.14.1-3.1
- fix #472502 - problem with fdisk and use +sectors for the end of partition
* Mon Oct 6 2008 Karel Zak <kzak@redhat.com> 2.14.1-3
- fix #465761 - mount manpage is missing uid/gid mount options for tmpfs
- refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0)