From 15ac0bc6915c154ba28b0b0ccf87ca6488eb6d47 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Tue, 25 Feb 2014 22:30:06 +0000 Subject: [PATCH] ck_bitmap: Fix length calculation error in ck_bitmap_union (crasher). --- include/ck_bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ck_bitmap.h b/include/ck_bitmap.h index 30dd3f0..475caef 100644 --- a/include/ck_bitmap.h +++ b/include/ck_bitmap.h @@ -161,7 +161,7 @@ ck_bitmap_union(struct ck_bitmap *dst, struct ck_bitmap *src) if (src->n_bits < dst->n_bits) n_buckets = src->n_bits; - n_buckets /= sizeof(CK_BITMAP_WORD); + n_buckets = CK_BITMAP_BLOCKS(n_buckets); for (n = 0; n < n_buckets; n++) CK_BITMAP_OR(&dst->map[n], src->map[n]);