Add sanity check for nano ID in nano equip handler

This commit is contained in:
Gent S 2020-11-23 17:03:08 -05:00
parent 07a1927b9f
commit 0f1d9cdf1c
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ void NanoManager::nanoEquipHandler(CNSocket* sock, CNPacketData* data) {
Player *plr = PlayerManager::getPlayer(sock);
// sanity checks
if (plr == nullptr || nano->iNanoSlotNum > 2 || nano->iNanoSlotNum < 0)
if (plr == nullptr || nano->iNanoSlotNum > 2 || nano->iNanoSlotNum < 0 || nano->iNanoID > 36)
return;
resp.iNanoID = nano->iNanoID;