mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-21 09:00:33 +00:00
Add sanity check for nano ID in nano equip handler
This commit is contained in:
@@ -69,7 +69,7 @@ void NanoManager::nanoEquipHandler(CNSocket* sock, CNPacketData* data) {
|
|||||||
Player *plr = PlayerManager::getPlayer(sock);
|
Player *plr = PlayerManager::getPlayer(sock);
|
||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if (plr == nullptr || nano->iNanoSlotNum > 2 || nano->iNanoSlotNum < 0)
|
if (plr == nullptr || nano->iNanoSlotNum > 2 || nano->iNanoSlotNum < 0 || nano->iNanoID > 36)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
resp.iNanoID = nano->iNanoID;
|
resp.iNanoID = nano->iNanoID;
|
||||||
|
|||||||
Reference in New Issue
Block a user