This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
リビジョン | 49b59a3b555866406356c00d93666d68b297195b (tree) |
---|---|
日時 | 2009-04-19 16:43:42 |
作者 | Benjamin Berkels <torr.samaho@quan...> |
コミッター | Benjamin Berkels |
ported changes of the main trunk from revision 2066-2067:
- Removed unnecessarily linked libraries
- Fixed: The RCON utility crashed when somebody said a chat string with "%n" or similar printf compatible format parameters. Again thanks to kgsws for reporting.
SVN r2068 (0.97d3-hotfixes)
@@ -17,6 +17,7 @@ | ||
17 | 17 | |
18 | 18 | - - Fixed a critical security bug of the server. Thanks a lot to kgsws for submitting a detailed report on this issue along with an implementation of the exploit. [Torr Samaho] |
19 | 19 | - - Fixed: A malicious client could skip the map authentication. Thanks to kgsws for his detailed report on this. [Torr Samaho] |
20 | +- - Fixed: The RCON utility crashed when somebody said a chat string with "%n" or similar printf compatible format parameters. Again thanks to kgsws for reporting. [Torr Samaho] | |
20 | 21 | ! - Changed: All line breaks are removed from the comment when an entry is added to the banlist or whitelist. Thanks to kgsws for pointing me to this. [Torr Samaho] |
21 | 22 | |
22 | 23 | v0.97d3 |
@@ -744,8 +744,9 @@ | ||
744 | 744 | break; |
745 | 745 | case SVRC_MESSAGE: |
746 | 746 | |
747 | + // [BB] The string may contain format parameters like %n, so we may not use Printf! | |
747 | 748 | if ( g_State == STATE_CONNECTED ) |
748 | - Printf( NETWORK_ReadString( pByteStream )); | |
749 | + MAIN_Print( true, NETWORK_ReadString( pByteStream )); | |
749 | 750 | break; |
750 | 751 | case SVRC_UPDATE: |
751 | 752 |
@@ -907,13 +908,13 @@ | ||
907 | 908 | void VPrintf( bool bTimestamp, const char *pszString, va_list Parms ) |
908 | 909 | { |
909 | 910 | char szOutLine[8192]; |
910 | - vsprintf( szOutLine, pszString, Parms ); | |
911 | + vsprintf_s( szOutLine, pszString, Parms ); | |
911 | 912 | MAIN_Print( bTimestamp, szOutLine ); |
912 | 913 | } |
913 | 914 | |
914 | 915 | //***************************************************************************** |
915 | 916 | // |
916 | -void MAIN_Print( bool bTimestamp, char *pszString ) | |
917 | +void MAIN_Print( bool bTimestamp, const char *pszString ) | |
917 | 918 | { |
918 | 919 | main_UpdateStatusbar( pszString ); |
919 | 920 |
@@ -77,6 +77,6 @@ | ||
77 | 77 | int Printf( const char *pszString, ... ); |
78 | 78 | int Printf_NoTimestamp( const char *pszString, ... ); |
79 | 79 | void VPrintf( bool bTimestamp, const char *pszString, va_list Parms ); |
80 | -void MAIN_Print( bool bTimestamp, char *pszString ); | |
80 | +void MAIN_Print( bool bTimestamp, const char *pszString ); | |
81 | 81 | |
82 | 82 | #endif // __MAIN_H__ |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | 2 | <VisualStudioProject |
3 | 3 | ProjectType="Visual C++" |
4 | - Version="8.00" | |
4 | + Version="8,00" | |
5 | 5 | Name="rcon_utility" |
6 | 6 | ProjectGUID="{175EE94F-6232-4618-AE8E-087E51D22E94}" |
7 | 7 | RootNamespace="rcon_utility" |
@@ -62,7 +62,7 @@ | ||
62 | 62 | /> |
63 | 63 | <Tool |
64 | 64 | Name="VCLinkerTool" |
65 | - AdditionalDependencies="user32.lib wsock32.lib winmm.lib shell32.lib gdi32.lib user32.lib comctl32.lib shell32.lib advapi32.lib comdlg32.lib ole32.lib dxguid.lib dsound.lib ddraw.lib dinput8.lib strmiids.lib wsock32.lib winmm.lib setupapi.lib ws2_32.lib opengl32.lib glu32.lib fmodvc.lib" | |
65 | + AdditionalDependencies="user32.lib wsock32.lib winmm.lib shell32.lib gdi32.lib user32.lib comctl32.lib shell32.lib advapi32.lib comdlg32.lib ole32.lib dxguid.lib dsound.lib ddraw.lib dinput8.lib strmiids.lib wsock32.lib winmm.lib setupapi.lib ws2_32.lib" | |
66 | 66 | OutputFile="./Debug/$(ProjectName).exe" |
67 | 67 | LinkIncremental="2" |
68 | 68 | GenerateDebugInformation="true" |
@@ -138,7 +138,7 @@ | ||
138 | 138 | /> |
139 | 139 | <Tool |
140 | 140 | Name="VCLinkerTool" |
141 | - AdditionalDependencies="gdi32.lib user32.lib comctl32.lib shell32.lib advapi32.lib comdlg32.lib ole32.lib dxguid.lib dsound.lib ddraw.lib dinput8.lib strmiids.lib wsock32.lib winmm.lib fmodvc.lib setupapi.lib ws2_32.lib opengl32.lib glu32.lib" | |
141 | + AdditionalDependencies="gdi32.lib user32.lib comctl32.lib shell32.lib advapi32.lib comdlg32.lib ole32.lib dxguid.lib dsound.lib ddraw.lib dinput8.lib strmiids.lib wsock32.lib winmm.lib setupapi.lib ws2_32.lib" | |
142 | 142 | OutputFile="./Release/$(ProjectName).exe" |
143 | 143 | /> |
144 | 144 | <Tool |