[Bug 2986] r1019 ps.clientNum

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Mon Sep 24 20:22:51 EDT 2007


http://bugzilla.icculus.org/show_bug.cgi?id=2986





------- Comment #4 from next_ghost at quick.cz  2007-09-24 20:22 EDT -------
Created an attachment (id=1522)
 --> (http://bugzilla.icculus.org/attachment.cgi?id=1522&action=view)
SetTeam fix

Actually, client->ps.clientNum is unsafe. We had a little hunt for this some
time ago in Tremulous last year (it caused kick failures, annoying popup
windows and other nasty bugs). The problem is that a following spectator gets
full copy of client->ps of the followed player including clientNum. If you then
try to use this "shared" clientNum, you might affect someone else than you
wanted.

r1019 changes are safe as long as bots don't spectate players. However, a brief
grep on current code has revealed unsafe client->ps.clientNum usage in
SetTeam(). If a following spectator uses team command when forced balance is
on, it'll count teams incorrectly and send the error message to the followed
player instead. Here's the fix.


-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the quake3-bugzilla mailing list