lib:util: Fix undefined behavior in bitmap.c