diff --git a/src/lib/ndpi_filter.c b/src/lib/ndpi_filter.c index 8726946295c..989eb9317e1 100644 --- a/src/lib/ndpi_filter.c +++ b/src/lib/ndpi_filter.c @@ -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" /* ******************************************* */ diff --git a/src/lib/third_party/include/binaryfusefilter.h b/src/lib/third_party/include/binaryfusefilter.h index a6e4c4adb3e..4835f92eae1 100644 --- a/src/lib/third_party/include/binaryfusefilter.h +++ b/src/lib/third_party/include/binaryfusefilter.h @@ -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; }