summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-18 07:13:35 +0000
committerphk <phk@FreeBSD.org>2005-03-18 07:13:35 +0000
commit2e5f4224e9080e367b0d1ea3629437faecdb1c7c (patch)
tree4880af7873237e91b793d50eeafe985e123ea5a9 /sys/dev/random
parent31aaa9f6198024c1cc3577fa790611aee75ee00f (diff)
downloadFreeBSD-src-2e5f4224e9080e367b0d1ea3629437faecdb1c7c.zip
FreeBSD-src-2e5f4224e9080e367b0d1ea3629437faecdb1c7c.tar.gz
Fix off-by-one (too little!) array size problem.
Detected by: Coverity (ID#661)
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/randomdev_soft.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/random/randomdev_soft.c b/sys/dev/random/randomdev_soft.c
index fb25d5c..87f13af 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;
OpenPOWER on IntegriCloud