Hello community,

here is the log from the commit of package util-linux for openSUSE:Factory 
checked in at 2012-04-17 22:03:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/util-linux (Old)
 and      /work/SRC/openSUSE:Factory/.util-linux.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "util-linux", Maintainer is "pu...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/util-linux/util-linux.changes    2012-04-02 
10:29:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.util-linux.new/util-linux.changes       
2012-04-17 22:04:36.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Apr 12 09:09:05 UTC 2012 - pu...@suse.com
+
+- fix miscalculation in sfdisk on ix86 (bnc#754789)
+  - add sfdisk-fix-calculation-due-to-type-mismatch.patch
+
+-------------------------------------------------------------------

New:
----
  sfdisk-fix-calculation-due-to-type-mismatch.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.CirvwU/_old  2012-04-17 22:04:38.000000000 +0200
+++ /var/tmp/diff_new_pack.CirvwU/_new  2012-04-17 22:04:38.000000000 +0200
@@ -87,6 +87,7 @@
 Patch1:         util-linux-2.12r-fdisk_remove_bogus_warnings.patch
 Patch2:         util-linux-2.20-libmount-deps.patch
 Patch3:         fdisk-tinfo.patch
+Patch4:         sfdisk-fix-calculation-due-to-type-mismatch.patch
 
 ##
 ## adjtimex
@@ -193,6 +194,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 #
 cd adjtimex-*
@@ -246,6 +248,7 @@
 autoreconf -fi
 export SUID_CFLAGS="-fpie"
 export SUID_LDFLAGS="-pie"
+export CFLAGS="-ggdb3 -O0"
 %configure \
   --with-audit \
   --with-selinux \

++++++ sfdisk-fix-calculation-due-to-type-mismatch.patch ++++++
>From 9c45d49fe01c1c8f971d7d2d664e40dd82d00cf5 Mon Sep 17 00:00:00 2001
From: Petr Uzel <petr.u...@suse.cz>
Date: Fri, 6 Apr 2012 16:53:13 +0200
Subject: [PATCH] sfdisk: fix calculation due to type mismatch (ix86)

Instructing sfdisk to create one partition spanning
across entire disk (",,") on 32bit system, if the disk
is sufficiently large (~2TB) leads to wrong calculation
in compute_start_sect() due to type mismatch.

Can be reproduced as:

--------------------------
linux-3ln5:~ # modprobe scsi_debug virtual_gb=2000
linux-3ln5:~ # sfdisk /dev/sda <<< ',,'
Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 261083 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
sfdisk:  /dev/sda: unrecognized partition table type

Old situation:
sfdisk: No partitions found

no room for partition descriptor
sfdisk: bad input
--------------------------

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=754789
Reported-by: Dan Mares <dan.ma...@norcrossgroup.com>
Signed-off-by: Petr Uzel <petr.u...@suse.cz>
---
 fdisk/sfdisk.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: util-linux-2.21.1/fdisk/sfdisk.c
===================================================================
--- util-linux-2.21.1.orig/fdisk/sfdisk.c
+++ util-linux-2.21.1/fdisk/sfdisk.c
@@ -1990,7 +1990,7 @@ static int
 compute_start_sect(struct part_desc *p, struct part_desc *ep) {
     unsigned long long base;
     int inc = (DOS && B.sectors) ? B.sectors : 1;
-    int delta;
+    long long delta;
 
     if (ep && p->start + p->size >= ep->start + 1)
        delta = p->start - ep->start - inc;
@@ -2005,7 +2005,7 @@ compute_start_sect(struct part_desc *p,
        p->size += delta;
        if (is_extended(p->p.sys_type) && boxes == ONESECTOR)
            p->size = inc;
-       else if ((ssize_t) old_size <= (ssize_t) - delta) {
+       else if ((long long) old_size <= -delta) {
            my_warn(_("no room for partition descriptor\n"));
            return 0;
        }
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to