Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Some usb devices come with an internal emulat...
details: https://anonhg.NetBSD.org/src/rev/2da6612c0de5
branches: trunk
changeset: 750562:2da6612c0de5
user: martin <martin%NetBSD.org@localhost>
date: Wed Jan 06 20:16:57 2010 +0000
description:
Some usb devices come with an internal emulated umass CD drive (containing
windows drivers). I have such a device that has 0 features - avoid wrappig
features_len to a very big unsiged 32bit number in this case.
diffstat:
sys/dev/scsipi/cd.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 05286a0c6049 -r 2da6612c0de5 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c Wed Jan 06 19:46:43 2010 +0000
+++ b/sys/dev/scsipi/cd.c Wed Jan 06 20:16:57 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd.c,v 1.296 2009/12/06 22:48:17 dyoung Exp $ */
+/* $NetBSD: cd.c,v 1.297 2010/01/06 20:16:57 martin Exp $ */
/*-
* Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.296 2009/12/06 22:48:17 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.297 2010/01/06 20:16:57 martin Exp $");
#include "rnd.h"
@@ -3005,6 +3005,8 @@
}
features_len = _4btol(gc->data_len);
+ if (features_len < 4)
+ break;
pos = 0;
fpos = &gc->feature_desc[0];
Home |
Main Index |
Thread Index |
Old Index