Sanitize load_amxscript() and add load_amxscript_ex/MF_LoadAmxScriptEx() requiring error max length (#530)

* Add a saner version of load_amxscript and use SafeStrcpy/Sprintf

* Reflect the change in core

* Add LoadAmxScriptEx API function

* Reflect the change in CSX

* Reflect the change in DodX

* Reflect the change in TFCX

* Reflect the change in TSX

* Add few comments
This commit is contained in:
Vincent Herbet
2018-08-30 18:49:42 +02:00
committed by GitHub
parent 76378fd5d0
commit 6e9947b64f
18 changed files with 66 additions and 47 deletions

View File

@@ -421,7 +421,7 @@ void OnAmxxAttach(){
if ( path && *path )
{
char error[128];
g_rank.loadCalc( MF_BuildPathname("%s",path) , error );
g_rank.loadCalc( MF_BuildPathname("%s",path) , error, sizeof(error));
}
if ( !g_rank.begin() )