Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] bug with server_remove_player()
Home

[Freeciv-Dev] bug with server_remove_player()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] bug with server_remove_player()
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Sun, 28 May 2000 23:41:46 +0200

shuffle_players inserts player pointers on civserver.c l489.
we sniff_packets() (and possibly remove players) at l498
we use the shuffled player pointers at the lines below... (and a removed
player can be among them).
We then crash when we use the pointer to the removed player.

As another bug, in end_turn() we assume that any values in the shuffled
array above nplayers is NULL, when it could be a pointer to a previously
removed player.

I don't have the energy to try to fix this right now. Any suggestions to
a clean fix? I think we should just disable the remoe_player option and
avoid further bugs...

-Thue



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] bug with server_remove_player(), Thue Janus Kristensen <=