On Wed, Aug 06, 2008 at 07:37:04PM +0200, Jim Meyering wrote:
> > If ped_disk_get_last_partition_num(disk) fails (which it will if
> > disk is a loopback device), it will return -1. This in turn will
> > cause _disk_sync_part_table and  _dm_reread_part_table to attempt to
> > malloc a sizeof(int)*-1, which instantly causes a "Fatal: Out of
> > memory".
> >
> > This patch detects this case, and pretends the last partition id is 0.
> Thanks, but I prefer to keep declaration and first use together, when
> reasonable.

I do too. My preference for keeping declarations together at the top of
the function was just stronger, but I'm not insistant either way. :)

-- 
Soren Hansen               | 
Virtualisation specialist  | Ubuntu Server Team
Canonical Ltd.             | http://www.ubuntu.com/

Attachment: signature.asc
Description: Digital signature

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to