From f7e6cbd933cafe20568561761a54ea72fd68f0b5 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 18 Mar 2005 07:13:35 +0000 Subject: Fix off-by-one (too little!) array size problem. Detected by: Coverity (ID#661) --- sys/dev/random/randomdev_soft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/random') diff --git a/sys/dev/random/randomdev_soft.c b/sys/dev/random/randomdev_soft.c index fb25d5ca659b1..87f13af331fb5 100644 --- a/sys/dev/random/randomdev_soft.c +++ b/sys/dev/random/randomdev_soft.c @@ -90,7 +90,7 @@ static struct entropyfifo emptyfifo; #define EMPTYBUFFERS 1024 /* Harvested entropy */ -static struct entropyfifo harvestfifo[ENTROPYSOURCE]; +static struct entropyfifo harvestfifo[ENTROPYSOURCE + 1]; /* <0 to end the kthread, 0 to let it run */ static int random_kthread_control = 0; -- cgit v1.3