aboutsummaryrefslogtreecommitdiffstats
path: root/games/freeciv/files/patch-server__unithand.c
blob: b52b3e41029e7980823b27ada4cfd751d3c83374 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- ./server/unithand.c.orig    Tue Dec 27 00:37:53 2005
+++ ./server/unithand.c Tue Sep 26 11:21:55 2006
@@ -1593,7 +1593,8 @@
   struct unit *punit = player_find_unit_by_id(pplayer, packet->unit_id);
   int i;
 
-  if (!punit || packet->length < 0 || punit->activity != ACTIVITY_IDLE) {
+  if (!punit || packet->length < 0 || punit->activity != ACTIVITY_IDLE
+      || packet->length > MAX_LEN_ROUTE) {
     return;
   }