diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-09 04:45:14 -0500 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-09 04:45:14 -0500 |
| commit | d557ca2dfba5ffcca99ceb41b07d149f871964b5 (patch) | |
| tree | 89ef5bd5fdb2a86fe10a5dead65b65bce8aa0a1d /Minecraft.World/Connection.cpp | |
| parent | 0c4f4599045edad935403e4d79d28f6b9aa95833 (diff) | |
LCEMP RCE fixes
Based on commit d017bfc30a68888bf5c79b23cf5c4f607cf828bf
Diffstat (limited to 'Minecraft.World/Connection.cpp')
| -rw-r--r-- | Minecraft.World/Connection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Minecraft.World/Connection.cpp b/Minecraft.World/Connection.cpp index 7f10dc4a..d4450266 100644 --- a/Minecraft.World/Connection.cpp +++ b/Minecraft.World/Connection.cpp @@ -108,8 +108,8 @@ Connection::Connection(Socket *socket, const wstring& id, PacketListener *packet const char *szId = wstringtofilename(id); char readThreadName[256]; char writeThreadName[256]; - sprintf(readThreadName,"%s read\n",szId); - sprintf(writeThreadName,"%s write\n",szId); + sprintf_s(readThreadName, sizeof(readThreadName), "%.240s read\n", szId); + sprintf_s(writeThreadName, sizeof(writeThreadName), "%.240s write\n", szId); readThread = new C4JThread(runRead, static_cast<void *>(this), readThreadName, READ_STACK_SIZE); writeThread = new C4JThread(runWrite, this, writeThreadName, WRITE_STACK_SIZE); |
