Use memory on stack instead of heap for temporary variables

This commit is contained in:
RincewindsHat 2023-07-23 22:07:33 +02:00
parent 103217831e
commit c5e90822d7

View file

@ -407,11 +407,7 @@ char *_np_state_generate_key() {
char keyname[41];
char *p=NULL;
unsigned char *result = malloc(256 * sizeof(unsigned char));
if (result == NULL) {
die(STATE_UNKNOWN, _("Failed to allocate memory for hashes: %s"), strerror(errno));
}
unsigned char result[256];
#ifdef USE_OPENSSL
/*