Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Zero rndsource before using it.
details: https://anonhg.NetBSD.org/src/rev/d07efd424ff1
branches: trunk
changeset: 931837:d07efd424ff1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri May 01 01:34:57 2020 +0000
description:
Zero rndsource before using it.
XXX pullup
diffstat:
sys/dev/ic/pckbc.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 3773b81bf0e2 -r d07efd424ff1 sys/dev/ic/pckbc.c
--- a/sys/dev/ic/pckbc.c Fri May 01 01:31:17 2020 +0000
+++ b/sys/dev/ic/pckbc.c Fri May 01 01:34:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc.c,v 1.61 2019/11/10 21:16:35 chs Exp $ */
+/* $NetBSD: pckbc.c,v 1.62 2020/05/01 01:34:57 riastradh Exp $ */
/*
* Copyright (c) 2004 Ben Harris.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.61 2019/11/10 21:16:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.62 2020/05/01 01:34:57 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -262,9 +262,12 @@
t->t_slotdata[slot] = NULL;
}
- if (child != NULL && t->t_slotdata[slot] != NULL)
+ if (child != NULL && t->t_slotdata[slot] != NULL) {
+ memset(&t->t_slotdata[slot]->rnd_source, 0,
+ sizeof(t->t_slotdata[slot]->rnd_source));
rnd_attach_source(&t->t_slotdata[slot]->rnd_source,
device_xname(child), RND_TYPE_TTY, RND_FLAG_DEFAULT);
+ }
return child != NULL;
}
Home |
Main Index |
Thread Index |
Old Index