bug-parted
[Top][All Lists]
Advanced

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

bug introduced in 1.4.13-pre1???


From: Timshel Knoll
Subject: bug introduced in 1.4.13-pre1???
Date: Wed, 23 May 2001 01:03:49 -0700
User-agent: Mutt/1.2.5i

Hi,

Just looking at the 1.4.13-pre1 sources, and it looks like you've
introduced a dereferencing bug ...

from ped_partition_set_system in disk.c, starting at line 773:

        if (part->type & PED_PARTITION_EXTENDED) {
                PedDiskType*            disk_type;

                PED_ASSERT (part->geom.disk != NULL, return 0);
                PED_ASSERT (disk_type != NULL, return 0);
                PED_ASSERT (disk_type->ops != NULL, return 0);
                PED_ASSERT (disk_type->ops->partition_set_extended_system
                                != NULL,
                            return 0);

                disk_type = part->geom.disk->type;
                return disk_type->ops->partition_set_extended_system (part);
        }

You're dereferencing disk_type in the PED_ASSERT's before it's been
initialised ... the right place to put the initialisation is between
the 1st and 2nd assert, isn't it???

Patch attached to that effect ...

Timshel

Attachment: parted.diff
Description: Text document


reply via email to

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