diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-12-31 15:36:42 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-12-31 15:36:42 +0000 |
commit | ea64cc1dc7033a1ede57f6bc278030429addeef9 (patch) | |
tree | 706b0c80eb6c002fb6ec86a6f82c304a4ad1d87d /code/server | |
parent | 148f86b3d35357bea3c7b981cbbc7a77e4e3fd56 (diff) | |
download | ioquake3-aero-ea64cc1dc7033a1ede57f6bc278030429addeef9.tar.gz ioquake3-aero-ea64cc1dc7033a1ede57f6bc278030429addeef9.zip |
fix buffer overflow and format string bug in auth server response
processing
git-svn-id: svn://svn.icculus.org/quake3/trunk@1025 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r-- | code/server/sv_client.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 5685457..3a4a74b 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -149,7 +149,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" ); @@ -195,8 +194,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] ) ); @@ -207,8 +205,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 |