mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-08-26 13:51:49 +00:00
Fix buffer overflow
This commit is contained in:
parent
356951d2f7
commit
cbb029817f
@ -8,7 +8,7 @@ void ENT_RegisterCVars( void );
|
|||||||
|
|
||||||
struct EntoolsEntData {
|
struct EntoolsEntData {
|
||||||
bool enttools; // created by enttools
|
bool enttools; // created by enttools
|
||||||
char ownerid[32];
|
char ownerid[33];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ENTTOOLS_H
|
#endif // ENTTOOLS_H
|
||||||
|
@ -180,10 +180,10 @@ void GGM_ClientPutinServer(edict_t *pEntity, CBasePlayer *pPlayer)
|
|||||||
pPlayer->gravgunmod_data.m_state = STATE_CONNECTED;
|
pPlayer->gravgunmod_data.m_state = STATE_CONNECTED;
|
||||||
|
|
||||||
const char *uid = GETPLAYERAUTHID( pPlayer->edict() );
|
const char *uid = GETPLAYERAUTHID( pPlayer->edict() );
|
||||||
if( strstr(uid, "PENDING") )
|
if( !uid || strstr(uid, "PENDING") )
|
||||||
uid = g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "ip" );
|
uid = g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "ip" );
|
||||||
|
|
||||||
strncpy( pPlayer->gravgunmod_data.uid, uid, 31 );
|
strncpy( pPlayer->gravgunmod_data.uid, uid, 32 );
|
||||||
pPlayer->gravgunmod_data.uid[32] = 0;
|
pPlayer->gravgunmod_data.uid[32] = 0;
|
||||||
pPlayer->gravgunmod_data.m_flEntTime = 0;
|
pPlayer->gravgunmod_data.m_flEntTime = 0;
|
||||||
pPlayer->gravgunmod_data.m_flEntScope = 0;
|
pPlayer->gravgunmod_data.m_flEntScope = 0;
|
||||||
|
@ -55,7 +55,7 @@ struct GGMData
|
|||||||
int m_iConfirmKey;
|
int m_iConfirmKey;
|
||||||
float m_flEntScope;
|
float m_flEntScope;
|
||||||
float m_flEntTime;
|
float m_flEntTime;
|
||||||
char uid[32];
|
char uid[33];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GRAVGUNMOD_H
|
#endif // GRAVGUNMOD_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user