When MAX_BINS is larger than MAX_BIN_ELEMENTS, this bug will cause boudary overflow in qb_array_create function.
Signed-off-by: Yunkai Zhang qiushu.zyk@taobao.com --- lib/array.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/array.c b/lib/array.c index 038cac2..96a7f43 100644 --- a/lib/array.c +++ b/lib/array.c @@ -29,7 +29,7 @@ #define ELEM_NUM_GET(_idx_) (_idx_ & 0xff)
struct qb_array { - void *bin[MAX_BIN_ELEMENTS]; + void *bin[MAX_BINS]; size_t max_elements; size_t element_size; size_t num_bins;