On Thu, Mar 27, 2014 at 05:09:41PM +0800, Fam Zheng wrote:
> +    if (has_granularity) {
> +        if (granularity & (granularity - 1)) {
> +            error_setg(errp, "Granularity must be power of 2");
> +            return;
> +        }
> +    } else {
> +        granularity = 65536;
> +    }

util/hbitmap.c has:
assert(granularity >= 0 && granularity < 64);

Please make sure the argument is checked before we pass it down.  We
should never hit an assertion failure due to bad inputs.

Stefan

Reply via email to