diff --git a/src/lib/ndpi_bitmap64.c b/src/lib/ndpi_bitmap64.c index f2d5bec892d1..64635291e4d9 100644 --- a/src/lib/ndpi_bitmap64.c +++ b/src/lib/ndpi_bitmap64.c @@ -174,6 +174,8 @@ bool ndpi_bitmap64_isset(ndpi_bitmap64 *_b, u_int64_t value) { return(false); if(!b->is_compressed) ndpi_bitmap64_compress(b); + if(!b->is_compressed) /* Compresssion might fail */ + return(false); return(binary_fuse16_contain(value, &b->bitmap)); } @@ -201,6 +203,8 @@ u_int32_t ndpi_bitmap64_size(ndpi_bitmap64 *_b) { if(!b) return(0); if(!b->is_compressed) ndpi_bitmap64_compress(b); + if(!b->is_compressed) /* Compresssion might fail */ + return(0); return(sizeof(ndpi_bitmap64) + binary_fuse16_size_in_bytes(&b->bitmap)); }