diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-03-26 08:24:53 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-03-26 08:24:53 +0000 |
commit | 6bed3968c563fc55c7a2306453302a03d6bac517 (patch) | |
tree | 8225ec8eda8831ad9ea089a99e53fca837dfa7ef /sys | |
parent | e72fb01c45891b3cb4fa5b0147e2debe666843f7 (diff) |
use 'sizeof(struct usb_video_frame_desc)' instead of a hardcoded
number
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uvideo.c | 5 |
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; |