mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Pylon: fix use after free
The member must contain a copy of the string, pointing it to the buffer used by the language cvar results in undefined behavior. Several cases were the string pointed to random data were reported.
This commit is contained in:
parent
723052eb6f
commit
b3e768190c
@ -390,8 +390,7 @@ bool CPylon::QueryServer(const char* endpoint, const char* request,
|
||||
|
||||
string finalUrl;
|
||||
CURLFormatUrl(finalUrl, hostName, endpoint);
|
||||
|
||||
finalUrl += Format("?language=%s", this->m_Language);
|
||||
finalUrl += Format("?language=%s", this->m_Language.c_str());
|
||||
|
||||
CURLParams params;
|
||||
|
||||
|
@ -34,6 +34,6 @@ public:
|
||||
private:
|
||||
string m_Token;
|
||||
string m_ErrorMsg;
|
||||
const char* m_Language;
|
||||
string m_Language;
|
||||
};
|
||||
extern CPylon* g_pMasterServer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user