Skip to content

Commit

Permalink
Fix crash in daemonded when calling /systeminfo
Browse files Browse the repository at this point in the history
Run "make server", choose a map and call /systeminfo, it should not crash anymore. Info_Print(char *s) will not check any array boundaries, so I just increased the static buffer length, as it is done in ioquake3:

https://github.com/ariya/ioquake3/blob/master/code/qcommon/q_shared.h#L228
https://github.com/ariya/ioquake3/blob/master/code/qcommon/common.c#L521
  • Loading branch information
kungfooman committed Oct 21, 2015
1 parent 92c425e commit 5b79087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/src/engine/qcommon/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ bool Com_AddStartupCommands()

void Info_Print( const char *s )
{
char key[ 512 ];
char value[ 512 ];
char key[ 8192 ];
char value[ 8192 ];
char *o;
int l;

Expand Down

0 comments on commit 5b79087

Please sign in to comment.