Bug 22727

Summary: disklabel crashes if the number of partitions equals MAXPARTITIONS
Product: Base System Reporter: Tony Finch <dot>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Tony Finch 2000-11-09 22:10:01 UTC
I tried to add another partition to the above configuration and I gave it the
letter 'i'. When I quit the editor, disklabel died from a segmentation fault
on line 841 of disklabel.c because the variable lp had been corrupted. I worked
out that this occurred in getasciilabel() because of an off-by-one error.

While I am here I note that disklabel handles editing the file in a way similar
to the way that crontab used to, until a vulnerability was found recently. I
don't know if it could cause problems, though.
Comment 1 Jens Schweikhardt freebsd_committer freebsd_triage 2001-07-07 17:39:45 UTC
State Changed
From-To: open->closed

Fixed a while ago in -current and already merged to -stable. 
Thanks, Tony!