diff --git a/src/bitvec.c b/src/bitvec.c index edb6cc3..8286d36 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -1,4 +1,5 @@ #include +#include #include #include #include "ucore/bitvec.h" @@ -68,6 +69,7 @@ void uc_bv_set_bits_from_array(struct UCBitVec *v,char *array,size_t array_len) for (i = 0; i < array_len; i++) { size_t idx = (size_t)bit_index(array_len); + if (unlikely(idx >= v->vec_len)) break;