mirror of
https://github.com/ioquake/jedi-academy.git
synced 2024-11-28 15:02:42 +00:00
buffer overflow and format string bug in auth server response processing
from Ludwig Nussel in ioquake3 svn 1025 git 8ca8d845911fb6545bf723cade39944d874d01ea fix buffer overflow and format string bug in auth server response processing
This commit is contained in:
parent
61687fff0c
commit
eec13dc1bf
1 changed files with 2 additions and 5 deletions
|
@ -144,7 +144,6 @@ void SV_AuthorizeIpPacket( netadr_t from ) {
|
|||
int i;
|
||||
char *s;
|
||||
char *r;
|
||||
char ret[1024];
|
||||
|
||||
if ( !NET_CompareBaseAdr( from, svs.authorizeAddress ) ) {
|
||||
Com_Printf( "SV_AuthorizeIpPacket: not from authorize server\n" );
|
||||
|
@ -190,8 +189,7 @@ void SV_AuthorizeIpPacket( netadr_t from ) {
|
|||
if (!r) {
|
||||
NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, "print\nAwaiting CD key authorization\n" );
|
||||
} else {
|
||||
sprintf(ret, "print\n%s\n", r);
|
||||
NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, ret );
|
||||
NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, "print\n%s\n", r);
|
||||
}
|
||||
// clear the challenge record so it won't timeout and let them through
|
||||
Com_Memset( &svs.challenges[i], 0, sizeof( svs.challenges[i] ) );
|
||||
|
@ -202,8 +200,7 @@ void SV_AuthorizeIpPacket( netadr_t from ) {
|
|||
if (!r) {
|
||||
NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, "print\nSomeone is using this CD Key\n" );
|
||||
} else {
|
||||
sprintf(ret, "print\n%s\n", r);
|
||||
NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, ret );
|
||||
NET_OutOfBandPrint( NS_SERVER, svs.challenges[i].adr, "print\n%s\n", r);
|
||||
}
|
||||
|
||||
// clear the challenge record so it won't timeout and let them through
|
||||
|
|
Loading…
Reference in a new issue