ensiform Posted July 17, 2005 Posted July 17, 2005 since the board rolled back b4 this post was made ill post again, and its changed a bit better since then: void trap_SendServerCommand( int clientNum, const char *text ) { // rain - #433 - commands over 1022 chars will crash the // client engine upon receipt, so ignore them // CHRUKER: b001 - Truncating the oversize server command before writing it to the log if( strlen( text ) > 1022 ) { G_LogPrintf( "%s: trap_SendServerCommand( %d, ... ) length exceeds 1022.\n", GAMEVERSION, clientNum ); G_LogPrintf( "%s: text [%.950s]... truncated\n", GAMEVERSION, text ); return; } syscall( G_SEND_SERVER_COMMAND, clientNum, text ); }
ensiform Posted July 18, 2005 Author Posted July 18, 2005 http://games.chruker.dk/enemy_territory/modding_project_bugfix.php #1 and rain.
RpTheHotrod Posted August 10, 2005 Posted August 10, 2005 JA+ has had this fixed for a long time. I thought slider released a patch for server operators (even non-ja+)to keep this from happening...or was that another file he released. I'm not sure about 2.1 or before, but I know ja+ 2.2 and ja+ 2.3 fixes this problem.
ensiform Posted August 11, 2005 Author Posted August 11, 2005 confirmed... you need something like this also at the top of G_Say: if (strlen(chatText) > MAX_SAY_TEXT) { G_LogPrintf( "G_Say( cl:%d ) length exceeds 150.\n", ent->client->ps.clientNum ); return; } this will fix the chat exceeding bug where it causes server to crash. what i posted above (in the first post) the q3msgboom.cfg, etc seemed immune to it. but this stops it. Update: use this in G_Say but remove the trunc line in the top post: G_LogPrintf( "text [%.950s]... truncated\n", text ); return; thats not needed, because it causes lag. mmm theres still lag sometimes :S so... in g_syscalls there is: void trap_SendServerCommand( int clientNum, const char *text ) { // rain - #433 - commands over 1022 chars will crash the // client engine upon receipt, so ignore them // CHRUKER: b001 - Truncating the oversize server command before writing it to the log if( strlen( text ) > 1022 ) { G_LogPrintf( "trap_SendServerCommand( %d, ... ) length exceeds 1022.\n", clientNum ); } syscall( G_SEND_SERVER_COMMAND, clientNum, text ); } then in G_Say: if (strlen(chatText) > MAX_SAY_TEXT) { G_LogPrintf( "G_Say( cl:%d ) length exceeds 150.\n", ent->client->ps.clientNum ); return; } but the console basically shows 3 lines of the g_syscall warning. 2:13 G_Say( cl:2 ) length exceeds 150. 2:13 trap_SendServerCommand( 2, ... ) length exceeds 1022. 2:13 trap_SendServerCommand( 2, ... ) length exceeds 1022. 2:13 trap_SendServerCommand( 2, ... ) length exceeds 1022.
RpTheHotrod Posted August 11, 2005 Posted August 11, 2005 Is that "the" fix...or is that the fix that you said still had problems? I know you and Slider got together to talk about getting the permanent fix. It this it? or is this the still buggy one?
ensiform Posted August 11, 2005 Author Posted August 11, 2005 pretty much yes you just must stop the execution of G_Say or G_SayTo i believe in order for the chat exploit to stop working.
ensiform Posted August 12, 2005 Author Posted August 12, 2005 stubert said: yea thanks i helped with this gg newbies no you didnt. didnt use what u showed. i reverted back to et's fix.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.