Bug 81069 - fdisk -s overflow
Summary: fdisk -s overflow
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux
Version: 7.3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-03 23:25 UTC by Thomas Dickson
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-01-13 21:50:29 UTC

Attachments (Terms of Use)
This is a patch to sfdisk.c to fix the problem (569 bytes, patch)
2003-01-03 23:33 UTC, Thomas Dickson
no flags Details | Diff

Description Thomas Dickson 2003-01-03 23:25:03 UTC
Description of problem:

The current 7.3 version of fdisk does not correctly respond to the fdisk -s 
command if the drive is over a certain size (at least 1 terabyte). It returns a 
negative number. The problem is in the ioctl call to BLKGETSIZE, which returns a 
UNSIGNED LONG, but fdisk expects a long.

Version-Release number of selected component (if applicable):


How reproducible:

run fdisk -s /dev/sda when sda is really big (1.3 terabytes)

Steps to Reproduce:

1. Get a disk over a terabyte (RAID)

2. run fdisk -s on the device

3. compare to fdisk -l on the same device


Actual results:


Expected results:


Additional info:

Error is in fdisk.c

Comment 1 Thomas Dickson 2003-01-03 23:33:42 UTC
Created attachment 89117 [details]
This is a patch to sfdisk.c to fix the problem

Given that the problem is simple and in the last lines of code, we fixed it
ourselves. This patch fixes sfdisk.c - to do the same to fdisk.c should be

Thomas Dickson
InoStor, INC.
Poway, CA

Comment 2 Elliot Lee 2003-01-13 21:50:29 UTC
Thanks, will be fixed in 2.11y-2

Note You need to log in before you can comment on or make changes to this bug.