Fixed Finalize memory crashing bug

This commit is contained in:
Mehdi Ben Hadj Khelifa 2024-07-03 12:07:12 +01:00
parent 7d5da3a2da
commit 0cd94decd0
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,7 @@ int stop_crypto() {
int finalize() {
int ret;
char *errm;
char *errm = (char *)calloc(MAX_STRING_SIZE , sizeof(char));
if (SendCall(FINALIZE, "", &ret, &errm)) {
std::cout << "Finalize failed. return is " << ret << " and message is "

View File

@ -29,6 +29,7 @@
#ifndef CONTROL_TOOLS_H
#define CONTROL_TOOLS_H
#define MAX_STRING_SIZE 1024
namespace control_tools {
int start_crypto(const char *pass);