From 016ce3ac4035ee4b4e86560de9f3159398a73132 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 4 Mar 2021 14:03:37 +0300 Subject: [PATCH] Fix a segfault/crash due to invalid packet size checking for the timer (TI) packet --- src/packet_distribution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index b2e5d3e..ea4c77a 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -627,7 +627,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet) if (type == 0 || type == 1) { - if (f_contents.size() < 2) + if (f_contents.size() < 3) goto end; // The time as displayed on the clock, in milliseconds.