From: Ondrej Zajicek Date: Mon, 30 Jun 2014 09:55:22 +0000 (+0200) Subject: Fixes integer overflow in show memory command. X-Git-Tag: v1.4.4~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20e8d040b09f1e01c431c686f1ced5a12ba7bc68;p=thirdparty%2Fbird.git Fixes integer overflow in show memory command. Thanks to Job Snijders for the bugreport. --- diff --git a/lib/slab.c b/lib/slab.c index e236e26e3..31529c309 100644 --- a/lib/slab.c +++ b/lib/slab.c @@ -123,7 +123,7 @@ static size_t slab_memsize(resource *r) { slab *s = (slab *) r; - int cnt = 0; + size_t cnt = 0; struct sl_obj *o; WALK_LIST(o, s->objs) @@ -346,7 +346,7 @@ static size_t slab_memsize(resource *r) { slab *s = (slab *) r; - int heads = 0; + size_t heads = 0; struct sl_head *h; WALK_LIST(h, s->empty_heads)