Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k/dev Make sure we don't accidently pass an un...
details: https://anonhg.NetBSD.org/src/rev/56e8c5083d3c
branches: trunk
changeset: 790691:56e8c5083d3c
user: martin <martin%NetBSD.org@localhost>
date: Sat Oct 19 16:19:13 2013 +0000
description:
Make sure we don't accidently pass an unsolicited packet as "ack only"
(which would dereference unitialized pointers)
diffstat:
sys/arch/mac68k/dev/adb_direct.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 8c78b49e2843 -r 56e8c5083d3c sys/arch/mac68k/dev/adb_direct.c
--- a/sys/arch/mac68k/dev/adb_direct.c Sat Oct 19 15:59:15 2013 +0000
+++ b/sys/arch/mac68k/dev/adb_direct.c Sat Oct 19 16:19:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adb_direct.c,v 1.64 2013/10/18 18:38:49 martin Exp $ */
+/* $NetBSD: adb_direct.c,v 1.65 2013/10/19 16:19:13 martin Exp $ */
/* From: adb_direct.c 2.02 4/18/97 jpw */
@@ -62,7 +62,7 @@
#ifdef __NetBSD__
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adb_direct.c,v 1.64 2013/10/18 18:38:49 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb_direct.c,v 1.65 2013/10/19 16:19:13 martin Exp $");
#include "opt_adb.h"
@@ -1693,6 +1693,8 @@
* the caller sent us.
*/
if (in->unsol) {
+ if (in->ack_only) panic("invalid ack-only pkg");
+
adbInbound[adbInTail].compRout = (void *)block.dbServiceRtPtr;
adbInbound[adbInTail].compData = (void *)block.dbDataAreaAddr;
adbInbound[adbInTail].saveBuf = (void *)adbInbound[adbInTail].data;
Home |
Main Index |
Thread Index |
Old Index