tFix for a trivial DOS of the server. - vaccinewars - be a doctor and try to va… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 0e46ea041de2ddc184132b01bf9f5e6a0c526b8c | |
parent 75737e6521d6a5f5f23435c29783072e3d99e52e | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 27 Sep 2004 04:54:09 +0000 | |
Fix for a trivial DOS of the server. | |
Diffstat: | |
M ChangeLog | 1 + | |
M src/message.c | 2 +- | |
2 files changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/ChangeLog b/ChangeLog | |
t@@ -9,6 +9,7 @@ cvs | |
file variables are now imposed for sanity | |
- Quique's Spanish translation is now available both in standard Spanish | |
(es.po) and es_ES.po, which uses drugs slang from Spain | |
+ - Fix for a trivial DOS of the server | |
1.5.9 07-06-2003 | |
- The messages window in the curses client can now be scrolled with the | |
diff --git a/src/message.c b/src/message.c | |
t@@ -1042,7 +1042,7 @@ int ProcessMessage(char *Msg, Player *Play, Player **Oth… | |
pt = Msg; | |
if (HaveAbility(Play, A_PLAYERID)) { | |
buf = GetNextWord(&pt, NULL); | |
- if (buf[0]) { | |
+ if (buf && buf[0]) { | |
ID = atoi(buf); | |
*Other = GetPlayerByID(ID, First); | |
} |