Bug 106976 - [PATCH] fix for segfault in parted.c
[PATCH] fix for segfault in parted.c
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-13 23:36 EDT by Michael Schwendt
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

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


Attachments (Terms of Use)
Proposed fix. (1.14 KB, patch)
2003-10-13 23:37 EDT, Michael Schwendt
no flags Details | Diff
Tested different fix (787 bytes, patch)
2003-10-14 19:54 EDT, Michael Schwendt
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2003-10-13 23:36:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:

# parted /dev/hdd mkpart l 10904 14905
Warning: You requested to create a partition at 10904.000-14905.000Mb. The
closest Parted can manage is 14904.083-14911.896Mb.
OK/Cancel? C


Actual results:
Segmentation fault

(same in user interface mode)


Expected results:
Information: Don't forget to update /etc/fstab, if necessary.             


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

How reproducible:
Always
Comment 1 Michael Schwendt 2003-10-13 23:37:17 EDT
Created attachment 95151 [details]
Proposed fix.
Comment 2 Michael Schwendt 2003-10-14 19:21:18 EDT
Comment on attachment 95151 [details]
Proposed fix.

Patch looks trivial, but causes mkpart to lock up.
Comment 3 Michael Schwendt 2003-10-14 19:54:07 EDT
Created attachment 95180 [details]
Tested different fix

# parted /dev/hdd mkpart l 10904 14905
Warning: You requested to create a partition at 10904.000-14905.000Mb. The
closest Parted can manage is 14904.083-14911.896Mb.
OK/Cancel? C								  
Information: Don't forget to update /etc/fstab, if necessary.		  

# parted /dev/hdd mkpart l 10904 14905
Warning: You requested to create a partition at 10904.000-14905.000Mb. The
closest Parted can manage is 14904.083-14911.896Mb.
OK/Cancel? OK								  
Information: Don't forget to update /etc/fstab, if necessary.
Comment 4 Michael Schwendt 2003-10-14 20:03:38 EDT
Just had the idea to get a newer parted tarball from rpmseek.com (since there's
none in the parted download area), and parted 1.6.6 contains a fix for this,
albeit they've moved the code-line down a few more lines.
Comment 5 Michael Schwendt 2003-10-14 20:17:05 EDT
Compared with the do_mkpartfs() function below, I've moved the code-line in
do_mkpart() to the same place. That looks right.

The "fix" in upstream parted 1.6.6 puts the line in a different place, which
contradicts with how they do it in the do_mkpartfs() function below. I doubt
there is a reason for that inconsistency.
Comment 6 Michael Schwendt 2003-10-22 16:29:37 EDT
After upstream mailing-list discussion, I stick to my patch from comment #3.
Comment 7 Jeremy Katz 2003-10-27 17:28:37 EST
Added for -31
Comment 8 Michael Schwendt 2003-10-28 12:40:15 EST
Thanks!

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