bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: There is a small bug in ped_geometry_{read,write}


From: Andrew Clausen
Subject: Re: There is a small bug in ped_geometry_{read,write}
Date: Fri, 25 Apr 2003 22:37:08 +1000
User-agent: Mutt/1.4i

On Wed, Apr 23, 2003 at 08:18:29PM +0200, K.G. wrote:
> Look at this :
> 
> int
> ped_geometry_read (const PedGeometry* geom, void* buffer, PedSector start,
>                  PedSector count)
> {
>       int             exception_status;
>       PedSector       real_start = geom->start + start;
> 
>       PED_ASSERT (geom != NULL, return 0);
>       PED_ASSERT (buffer != NULL, return 0);
>       PED_ASSERT (start >= 0, return 0);
>       PED_ASSERT (count >= 0, return 0);
> ...
> 
> Obviously real_start = geom->start + start; should take place after at least 
> the first assert.

Right.

> Should I look for other errors of the same type and write a patch for them ?

If you ahve time, that would be good, thanks :)

Cheers,
Andrew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]