X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e2a55a9e10716abc07c3d160bf1539423c216efd..30f74a9a4481804683c3c18dfc17788e274a27b9:/stglibs/srvconf.lib/netunit.cpp diff --git a/stglibs/srvconf.lib/netunit.cpp b/stglibs/srvconf.lib/netunit.cpp index df0af7f2..61dc5c69 100644 --- a/stglibs/srvconf.lib/netunit.cpp +++ b/stglibs/srvconf.lib/netunit.cpp @@ -312,7 +312,8 @@ BLOWFISH_CTX ctx; InitContext(password.c_str(), PASSWD_LEN, &ctx); size_t length = strlen(text); char buffer[length + 9]; -EncryptString(buffer, text, length, &ctx); +memset(buffer, 0, sizeof(buffer)); +EncryptString(buffer, text, length + 1, &ctx); if (send(outerSocket, buffer, sizeof(buffer), 0) <= 0) { errorMsg = SEND_DATA_ERROR;