mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
fix: use after free and uninitialized memory (#1603)
* fix use after free and uninitialized memory * add if check for packet lengths * move purge down further Its used in the if check too...
This commit is contained in:
@@ -382,6 +382,7 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
void HandlePacket(Packet* packet) {
|
||||
if (packet->length < 1) return;
|
||||
if (packet->data[0] == ID_DISCONNECTION_NOTIFICATION) {
|
||||
LOG("A server has disconnected");
|
||||
|
||||
|
Reference in New Issue
Block a user