From 9d0b0a8decfb3b26e5a6696054e717e3a1b5bbed Mon Sep 17 00:00:00 2001 From: mglocker Date: Tue, 22 Jul 2008 10:57:15 +0000 Subject: [PATCH] Fix uvm_fault crash in uvideo_vs_negotation() which was reported by some users. Thanks to mpf@ for his help to debug this bug down. --- sys/dev/usb/uvideo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 2a6e93efc0c..fa649100f1b 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.56 2008/07/19 11:30:55 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.57 2008/07/22 10:57:15 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy @@ -700,7 +700,7 @@ uvideo_vs_parse_desc_frame(struct uvideo_softc *sc) break; case UDESCSUB_VS_FRAME_UNCOMPRESSED: /* XXX do correct length calculation */ - if (desc->bLength == 38) { + if (desc->bLength > 11) { if (uvideo_vs_parse_desc_frame_uncompressed(sc, desc, &fmtidx)) return (1); -- 2.20.1