concat_len

This commit is contained in:
gonzalef 2020-04-28 18:07:06 +02:00
parent aa5ac80337
commit 27d38c3fe5

View File

@ -18,7 +18,7 @@ void hash_data(pub_data *data, unsigned char *buf) {
// Hash every data contained in data_list then return a network hash
void hash_network(list *data_list, unsigned char *buf) {
// Get list length to initialize concat buffer
int concat_len = len_list(data_list) * SHA256_DIGEST_LENGTH;
int concat_len = len_list(data_list) * 16;
unsigned char *concat = (unsigned char*) malloc(concat_len);
unsigned char hash[SHA256_DIGEST_LENGTH];