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

@@ -110,7 +110,7 @@ public:
void saveRank( const char* filename );
void loadRank( const char* filename );
RankStats* findEntryInRank(const char* unique, const char* name, bool isip=false);
bool loadCalc(const char* filename, char* error);
bool loadCalc(const char* filename, char* error, size_t maxLength);
inline int getRankNum( ) const { return rankNum; }
void clear();
void unloadCalc();