5f600d0e61e1de6bd0ab5c84964db1697b807803
GetNewDrop() allocated newdrop up front but returned NULL without freeing it on every rejection path (failed drop-rate check, missing drop table, unknown item type, etc.), leaking on every non-drop roll. Free it on all early-return paths, and only assign a clientid once a drop is actually going to be returned. CPacket::AddByte/Word/DWord/QWord/Float now bounds-check against the buffer before writing, preventing an overflow if a packet is built past its allocated size. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Languages
C++
92.9%
HTML
3.1%
C
2%
Python
1.3%
CMake
0.4%
Other
0.3%