X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e2a55a9e10716abc07c3d160bf1539423c216efd..53536f012e78a3d28ca1290109667ce2aba794d7:/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;