Add bounds checking for packet 51, type = 4
This commit is contained in:
parent
ac02468038
commit
42fb0b10f4
1 changed files with 6 additions and 0 deletions
|
|
@ -3632,6 +3632,12 @@ namespace TShockAPI
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == 4 && (id < 0 || id > Main.npc.Length))
|
||||||
|
{
|
||||||
|
//Type == 4 -> 'BigMimicSpawnSmoke'. This access Main.npc without any bounds checking on Terraria's side.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue