Fixed bug: incorrect array length definition

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>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Yunkai Zhang 2011-12-28 15:55:18 +08:00 committed by Angus Salkeld
parent d823a480dc
commit c8e97a1c2e

View File

@ -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;