Bug 106976 - [PATCH] fix for segfault in parted.c
Summary: [PATCH] fix for segfault in parted.c
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: parted
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matt Wilson
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-14 03:36 UTC by Michael Schwendt
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-31 22:50:10 UTC
Type: ---
Embargoed:


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

Description Michael Schwendt 2003-10-14 03:36:36 UTC
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-14 03:37:17 UTC
Created attachment 95151 [details]
Proposed fix.

Comment 2 Michael Schwendt 2003-10-14 23:21:18 UTC
Comment on attachment 95151 [details]
Proposed fix.

Patch looks trivial, but causes mkpart to lock up.

Comment 3 Michael Schwendt 2003-10-14 23:54:07 UTC
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-15 00:03:38 UTC
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-15 00:17:05 UTC
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 20:29:37 UTC
After upstream mailing-list discussion, I stick to my patch from comment #3.


Comment 7 Jeremy Katz 2003-10-27 22:28:37 UTC
Added for -31

Comment 8 Michael Schwendt 2003-10-28 17:40:15 UTC
Thanks!



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