Bug: The load_rooms function doesn't properly check sector types when loading a room.
Danger: High
Found by: Remcon
Fixed by: Remcon
-----
[db.c]
In load_rooms find:
if (pRoomIndex->sector_type < 0 || pRoomIndex->sector_type == SECT_MAX)
{
bug( "Fread_rooms: vnum %d has bad sector_type %d.", vnum ,
pRoomIndex->sector_type);
pRoomIndex->sector_type = 1;
}
Change it to:
if (pRoomIndex->sector_type < 0 || pRoomIndex->sector_type >= SECT_MAX)
{
bug( "Fread_rooms: vnum %d has bad sector_type %d.", vnum ,
pRoomIndex->sector_type);
pRoomIndex->sector_type = 1;
}
This can be bad because new areas may have sectors greater than SECT_MAX, and the code doesn't properly check for this.