mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 14:37:50 +00:00
util: abort construction of zero-sized bit arrays
This commit is contained in:
parent
963551877f
commit
7abc1733c5
@ -97,7 +97,7 @@ namespace Genode {
|
||||
_word_cnt(_bit_cnt / _BITS_PER_WORD),
|
||||
_words(addr)
|
||||
{
|
||||
if (bits % _BITS_PER_WORD) throw Invalid_bit_count();
|
||||
if (!bits || bits % _BITS_PER_WORD) throw Invalid_bit_count();
|
||||
|
||||
memset(_words, 0, sizeof(addr_t)*_word_cnt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user