bug-parted
[Top][All Lists]
Advanced

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

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


From: K . G .
Subject: There is a small bug in ped_geometry_{read,write}
Date: Wed, 23 Apr 2003 20:18:29 +0200

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.
This as result in a segfault when I was debugging my HFS patch.
Should I look for other errors of the same type and write a patch for them ?

---
Guillaume Knispel




reply via email to

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