Minor initialization fixes

This commit is contained in:
Luca Deri
2023-08-11 23:51:16 +02:00
parent ec7adc212e
commit 890dcf91d9
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -35,6 +35,9 @@
#include "ndpi_includes.h"
#include "ndpi_encryption.h"
#define malloc ndpi_malloc
#define free ndpi_free
#include "third_party/include/binaryfusefilter.h"
/* ******************************************* */
+1 -1
View File
@@ -227,7 +227,7 @@ static inline bool binary_fuse8_allocate(uint32_t size,
filter->ArrayLength =
(filter->SegmentCount + arity - 1) * filter->SegmentLength;
filter->SegmentCountLength = filter->SegmentCount * filter->SegmentLength;
filter->Fingerprints = (uint8_t*)malloc(filter->ArrayLength);
filter->Fingerprints = (uint8_t*)calloc(1,filter->ArrayLength);
return filter->Fingerprints != NULL;
}