Chameleon

Chameleon Commit Details

Date:2014-10-23 05:57:34 (6 years 1 month ago)
Author:Chuck Fry
Commit:2442
Parents: 2441
Message:Improved defensiveness against malloc failure
Changes:
M/branches/chucko/i386/libsaio/disk.c

File differences

branches/chucko/i386/libsaio/disk.c
749749
750750
751751
752
752
753753
754754
755755
......
10231023
10241024
10251025
1026
1026
10271027
10281028
10291029
......
10471047
10481048
10491049
1050
1050
1051
10511052
10521053
10531054
(*bvr->bv_free)(bvr);
bvr = NULL;
}
if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) {
else if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) {
bvr->flags |= kBVFlagBootable;
}
} else if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) {
* an Apple partition map elsewhere.
*/
#if UNUSED
if (map->bvrcnt == 0)
if (map && map->bvrcnt == 0)
{
static struct fdisk_part cdpart;
cdpart.systid = 0xCD;
}
#endif
// Actually this should always be true given the above code
if(map == gDiskBVMap)
// (unless malloc failed above)
if(map && map == gDiskBVMap)
{
// Don't leave a null map in the chain
if(map->bvrcnt == 0 && map->bvr == NULL)

Archive Download the corresponding diff file

Revision: 2442