mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-26 18:40:08 +01:00
engine: client: limit token size in client dll parsefile to 1024 (GoldSrc value)
This commit is contained in:
parent
2fa964e939
commit
56103a90eb
@ -3089,7 +3089,7 @@ char *pfnParseFile( char *data, char *token )
|
||||
{
|
||||
char *out;
|
||||
|
||||
out = _COM_ParseFileSafe( data, token, INT_MAX, PFILE_HANDLECOLON, NULL );
|
||||
out = _COM_ParseFileSafe( data, token, PFILE_TOKEN_MAX_LENGTH, PFILE_HANDLECOLON, NULL );
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ enum
|
||||
// exported APIs headers and will get nice warning in case of changing values
|
||||
#define PFILE_IGNOREBRACKET (1<<0)
|
||||
#define PFILE_HANDLECOLON (1<<1)
|
||||
#define PFILE_TOKEN_MAX_LENGTH 1024
|
||||
|
||||
//
|
||||
// crtlib.c
|
||||
@ -98,7 +99,6 @@ void COM_Hex2String( uint8_t hex, char *str );
|
||||
#define COM_CheckStringEmpty( string ) ( ( !*string ) ? 0 : 1 )
|
||||
char *_COM_ParseFileSafe( char *data, char *token, const int size, unsigned int flags, int *len );
|
||||
#define COM_ParseFile( data, token, size ) _COM_ParseFileSafe( data, token, size, 0, NULL )
|
||||
#define COM_ParseFileLegacy( data, token ) COM_ParseFileSafe( data, token, INT_MAX )
|
||||
int matchpattern( const char *in, const char *pattern, qboolean caseinsensitive );
|
||||
int matchpattern_with_separator( const char *in, const char *pattern, qboolean caseinsensitive, const char *separators, qboolean wildcard_least_one );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user