Bug 81069 - fdisk -s overflow
fdisk -s overflow
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-03 18:25 EST by Thomas Dickson
Modified: 2007-04-18 12:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-13 16:50:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Thomas Dickson 2003-01-03 18:25:03 EST
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):


2.11n




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:


-857118750




Expected results:


1290364897




Additional info:


Error is in fdisk.c
Comment 1 Thomas Dickson 2003-01-03 18:33:42 EST
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
trivial.

Thomas Dickson
InoStor, INC.
Poway, CA
Comment 2 Elliot Lee 2003-01-13 16:50:29 EST
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.