Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Validate EATA signature in returned EATA configur...
details: https://anonhg.NetBSD.org/src/rev/a92c9cffbc72
branches: trunk
changeset: 480557:a92c9cffbc72
user: ad <ad%NetBSD.org@localhost>
date: Sat Jan 15 18:10:32 2000 +0000
description:
Validate EATA signature in returned EATA configuration data before anything
else. More proper than important.
diffstat:
sys/dev/ic/dpt.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 1fe8ec121858 -r a92c9cffbc72 sys/dev/ic/dpt.c
--- a/sys/dev/ic/dpt.c Sat Jan 15 17:14:22 2000 +0000
+++ b/sys/dev/ic/dpt.c Sat Jan 15 18:10:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dpt.c,v 1.14 2000/01/01 19:56:59 ad Exp $ */
+/* $NetBSD: dpt.c,v 1.15 2000/01/15 18:10:32 ad Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.14 2000/01/01 19:56:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.15 2000/01/15 18:10:32 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -563,13 +563,13 @@
return (-1);
}
- if (!ec->ec_hbavalid) {
- printf("%s: ec_hba field invalid\n", sc->sc_dv.dv_xname);
+ if (memcmp(ec->ec_eatasig, "EATA", 4) != 0) {
+ printf("%s: EATA signature mismatch\n", sc->sc_dv.dv_xname);
return (-1);
}
- if (memcmp(ec->ec_eatasig, "EATA", 4) != 0) {
- printf("%s: EATA signature mismatch\n", sc->sc_dv.dv_xname);
+ if (!ec->ec_hbavalid) {
+ printf("%s: ec_hba field invalid\n", sc->sc_dv.dv_xname);
return (-1);
}
Home |
Main Index |
Thread Index |
Old Index