[quake3-commits] r2214 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Dec 25 04:07:36 EST 2011


Author: zakk
Date: 2011-12-25 04:07:36 -0500 (Sun, 25 Dec 2011)
New Revision: 2214

Modified:
   trunk/code/qcommon/msg.c
Log:
bugzilla bug #5273
exploit resolved, we're now disallowing forwardmove of -128 and vice versa

Thanks, devhc!



Modified: trunk/code/qcommon/msg.c
===================================================================
--- trunk/code/qcommon/msg.c	2011-12-15 21:12:38 UTC (rev 2213)
+++ trunk/code/qcommon/msg.c	2011-12-25 09:07:36 UTC (rev 2214)
@@ -715,8 +715,14 @@
 	to->angles[1] = MSG_ReadDelta( msg, from->angles[1], 16);
 	to->angles[2] = MSG_ReadDelta( msg, from->angles[2], 16);
 	to->forwardmove = MSG_ReadDelta( msg, from->forwardmove, 8);
+	if( to->forwardmove == -128 )
+		to->forwardmove = -127;
 	to->rightmove = MSG_ReadDelta( msg, from->rightmove, 8);
+	if( to->rightmove == -128 )
+		to->rightmove = -127;
 	to->upmove = MSG_ReadDelta( msg, from->upmove, 8);
+	if( to->upmove == -128 )
+		to->upmove = -127;
 	to->buttons = MSG_ReadDelta( msg, from->buttons, 16);
 	to->weapon = MSG_ReadDelta( msg, from->weapon, 8);
 }
@@ -776,8 +782,14 @@
 		to->angles[1] = MSG_ReadDeltaKey( msg, key, from->angles[1], 16);
 		to->angles[2] = MSG_ReadDeltaKey( msg, key, from->angles[2], 16);
 		to->forwardmove = MSG_ReadDeltaKey( msg, key, from->forwardmove, 8);
+		if( to->forwardmove == -128 )
+			to->forwardmove = -127;
 		to->rightmove = MSG_ReadDeltaKey( msg, key, from->rightmove, 8);
+		if( to->rightmove == -128 )
+			to->rightmove = -127;
 		to->upmove = MSG_ReadDeltaKey( msg, key, from->upmove, 8);
+		if( to->upmove == -128 )
+			to->upmove = -127;
 		to->buttons = MSG_ReadDeltaKey( msg, key, from->buttons, 16);
 		to->weapon = MSG_ReadDeltaKey( msg, key, from->weapon, 8);
 	} else {



More information about the quake3-commits mailing list