X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e2a55a9e10716abc07c3d160bf1539423c216efd..5f488a67d8dae833dcd29b65804abf7904a90a86:/stglibs/srvconf.lib/netunit.cpp?ds=sidebyside 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;