From 399802a0f78428b60ee0e451fa53e40f3676595a Mon Sep 17 00:00:00 2001 From: Joseph Huang Date: Wed, 5 May 2010 09:23:55 -0700 Subject: [PATCH] block: Avoid accessing past the end of the block_by_role array. --- src/devices/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/block.c b/src/devices/block.c index 452c433..a3acec1 100644 --- a/src/devices/block.c +++ b/src/devices/block.c @@ -166,7 +166,7 @@ block_print_stats (void) { int i; - for (i = 0; i < BLOCK_CNT; i++) + for (i = 0; i < BLOCK_ROLE_CNT; i++) { struct block *block = block_by_role[i]; if (block != NULL) -- 2.30.2