On Sun, Dec 21, 2008 at 00:17, Jim Meyering <[email protected]> wrote:
> "Matthew S. Harris" <[email protected]> wrote:
>> Here's my one remaining fix.  Yes, I've been sitting on this one since
>> April 2007 too.  Hopefully it's clear why this one is important.
>
> Thanks!
> I don't want to block on test cases,
> but it'd sure make it easier to take a patch that
> comes with a small test case to exercise/demonstrate the fix.
>
> For example, if you can construct a tiny image,
> describe how to perturb it, and give a parted
> command that misbehaves as a result, yet that works
> with your patch, that'd be great.

I totally appreciate why you're asking, but I'm afraid that I just
don't have any more time to give to the Parted project.  I was sitting
on this fix for 20 months, so realistically you're not going to get
the test cases you want from me.

> Does something already ensure that SizeOfPartitionEntry is sane?
> i.e., what if the on-disk value is invalid?
> Maybe add a sanity check, if there isn't one already.

That's a good idea; I don't remember there being a sanity check.

>> +     ptes = ped_malloc (ptes_sectors * disk->dev->sector_size);
>
> Before doing the malloc, ensure that the product does not overflow,
> e.g.,
>
>  if (xalloc_oversized (ptes_sectors, disk->dev->sector_size)
>      goto ...;

That's a good idea too.

I'm sorry I can't be more helpful.


Matthew

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

Reply via email to