Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Don't read past the end of the sample buffer... (S...
details: https://anonhg.NetBSD.org/src/rev/c52dab818b26
branches: trunk
changeset: 807399:c52dab818b26
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Apr 08 13:24:23 2015 +0000
description:
Don't read past the end of the sample buffer... (Seriously???)
diffstat:
sys/kern/kern_rndq.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r eff9e3ae011a -r c52dab818b26 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c Wed Apr 08 13:16:37 2015 +0000
+++ b/sys/kern/kern_rndq.c Wed Apr 08 13:24:23 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rndq.c,v 1.37 2015/04/08 03:14:29 riastradh Exp $ */
+/* $NetBSD: kern_rndq.c,v 1.38 2015/04/08 13:24:23 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.37 2015/04/08 03:14:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.38 2015/04/08 13:24:23 riastradh Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -1070,7 +1070,7 @@
SIMPLEQ_REMOVE_HEAD(&dq_samples, next);
source = sample->source;
entropy = sample->entropy;
- sample_count = sample->cursor + 1;
+ sample_count = sample->cursor;
/*
* Don't provide a side channel for timing attacks on
Home |
Main Index |
Thread Index |
Old Index