]> Savannah Git Hosting - gnulib.git/commit
bitset: fix overflows
authorAkim Demaille <akim.demaille@gmail.com>
Sat, 16 Mar 2019 16:16:48 +0000 (17:16 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Sun, 17 Mar 2019 07:35:55 +0000 (08:35 +0100)
commit68cc43e4ffda1f0f6e2f15b6b5b449a7d605c288
treea70e4fcb4b65f6efaddb790aeedfa31f129224f5
parent3817922f8ace7348dbfccf299f91bd64a98d1409
bitset: fix overflows

Reported by Bruno Haible.
https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00017.html

* lib/bitset/table.c (tbitset_test): last_bit is the position of
the bit in the array of bitset_word, so be sure to take its modulo
number-of-bits-in-bitset-word (i.e., EBITSET_ELT_WORDS).
* lib/bitset/list.c (lbitset_unused_clear): Likewise.
ChangeLog
lib/bitset/list.c
lib/bitset/table.c