Changeset - r2892:8cb35230ee5d
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-01-26 18:45:04
darkvater@openttd.org
(svn r3446) - Fix: incorrect validating of tree-planting command which can allow a buffer-overflow (Tron)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
tree_cmd.c
Show inline comments
 
@@ -139,7 +139,7 @@ int32 CmdPlantTree(int ex, int ey, uint3
 
	int32 cost;
 
	int sx, sy, x, y;
 

	
 
	if (p2 > MapSize()) return CMD_ERROR;
 
	if (p2 >= MapSize()) return CMD_ERROR;
 
	/* Check the tree type. It can be random or some valid value within the current climate */
 
	if (p1 != (uint)-1 && p1 - _tree_base_by_landscape[_opt.landscape] >= _tree_count_by_landscape[_opt.landscape]) return CMD_ERROR;
 

	
0 comments (0 inline, 0 general)