Skip to content

Commit

Permalink
bugzilla bug #5273
Browse files Browse the repository at this point in the history
exploit resolved, we're now disallowing forwardmove of -128 and vice versa

Thanks, devhc!



git-svn-id: svn://svn.icculus.org/quake3/trunk@2214 edf5b092-35ff-0310-97b2-ce42778d08ea
  • Loading branch information
zakk committed Dec 25, 2011
1 parent fbfabf5 commit 7173a33
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/qcommon/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,14 @@ void MSG_ReadDeltaUsercmd( msg_t *msg, usercmd_t *from, usercmd_t *to ) {
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);
}
Expand Down Expand Up @@ -776,8 +782,14 @@ void MSG_ReadDeltaUsercmdKey( msg_t *msg, int key, usercmd_t *from, usercmd_t *t
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 {
Expand Down

0 comments on commit 7173a33

Please sign in to comment.