Bounds check network_receive_level_spawn_info()
This commit is contained in:
parent
47be56e1c7
commit
8d9bc4cb73
|
@ -107,6 +107,10 @@ void network_receive_level_spawn_info(struct Packet* p) {
|
||||||
packet_read(p, &spawnInfoDeletionCount, sizeof(u8));
|
packet_read(p, &spawnInfoDeletionCount, sizeof(u8));
|
||||||
LOG_INFO("rx spawn info (count %d)", spawnInfoDeletionCount);
|
LOG_INFO("rx spawn info (count %d)", spawnInfoDeletionCount);
|
||||||
if (spawnInfoDeletionCount <= 0) { return; }
|
if (spawnInfoDeletionCount <= 0) { return; }
|
||||||
|
if (thisAreaIndex >= MAX_AREAS) {
|
||||||
|
LOG_ERROR("Receiving 'location response' with invalid areaIndex!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct SpawnInfo* spawnInfo = gAreaData[thisAreaIndex].objectSpawnInfos;
|
struct SpawnInfo* spawnInfo = gAreaData[thisAreaIndex].objectSpawnInfos;
|
||||||
u16 spawnInfoIndex = 0;
|
u16 spawnInfoIndex = 0;
|
||||||
|
|
Loading…
Reference in New Issue