diff --git a/[refs] b/[refs] index fff27ba5dae1..e8233e67419e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5a75983eef1193c43caebde6643a218bd8d8390e +refs/heads/master: 0b030c2c2f0f1d98d5fe412e5b7cf7fd53f5221a diff --git a/trunk/lib/bitmap.c b/trunk/lib/bitmap.c index 26ebafa8c41d..2c9242e3fed0 100644 --- a/trunk/lib/bitmap.c +++ b/trunk/lib/bitmap.c @@ -469,6 +469,10 @@ int bitmap_scnlistprintf(char *buf, unsigned int buflen, /* current bit is 'cur', most recently seen range is [rbot, rtop] */ int cur, rbot, rtop; + if (buflen == 0) + return 0; + buf[0] = 0; + rbot = cur = find_first_bit(maskp, nmaskbits); while (cur < nmaskbits) { rtop = cur;