Skip to content

Commit

Permalink
Minor initialization fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaderi committed Aug 11, 2023
1 parent ec7adc2 commit 890dcf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/lib/ndpi_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

/* ******************************************* */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/third_party/include/binaryfusefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 890dcf9

Please sign in to comment.