diff --git a/src/util-radix-tree.c b/src/util-radix-tree.c index c004138ac0..714cdbf4f6 100644 --- a/src/util-radix-tree.c +++ b/src/util-radix-tree.c @@ -33,6 +33,7 @@ #include "util-byte.h" #include "util-cidr.h" #include "util-print.h" +#include "util-validate.h" /** * \brief Allocates and returns a new instance of SCRadixUserData. @@ -591,6 +592,9 @@ static SCRadixNode *SCRadixAddKey(uint8_t *key_stream, uint16_t key_bitlen, * the prefix */ bottom_node = node; + DEBUG_VALIDATE_BUG_ON(bottom_node == NULL); + DEBUG_VALIDATE_BUG_ON(bottom_node->prefix == NULL); + /* get the first bit position where the ips differ */ check_bit = (node->bit < bitlen)? node->bit: bitlen; for (i = 0; (i * 8) < check_bit; i++) {