summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2011-03-26 08:24:53 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2011-03-26 08:24:53 +0000
commit6bed3968c563fc55c7a2306453302a03d6bac517 (patch)
tree8225ec8eda8831ad9ea089a99e53fca837dfa7ef /sys/dev/usb
parente72fb01c45891b3cb4fa5b0147e2debe666843f7 (diff)
use 'sizeof(struct usb_video_frame_desc)' instead of a hardcoded
number
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/uvideo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index a32c7fe4e0a..2193a0d4bfb 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.156 2011/03/26 08:21:27 jakemsr Exp $ */
+/* $OpenBSD: uvideo.c,v 1.157 2011/03/26 08:24:52 jakemsr Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -634,7 +634,8 @@ uvideo_vc_parse_desc(struct uvideo_softc *sc)
break;
case UDESCSUB_VC_PROCESSING_UNIT:
/* XXX do correct length calculation */
- if (desc->bLength < 25) {
+ if (desc->bLength <
+ sizeof(struct usb_video_frame_desc)) {
(void)uvideo_vc_parse_desc_pu(sc, desc);
}
break;