diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-06-18 15:43:31 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-06-18 15:43:31 +0000 |
commit | 120e6b0ec214f1b5d3fc4373cfb944692ffff7fa (patch) | |
tree | c1f520e0f7e6a9a79b37ab5c3f37d684173840f6 | |
parent | f0da20955d9535abd01bfafb0a4526683ee38b72 (diff) |
Do not try to get the description of an unexisting video format,
from Gregor Best.
-rw-r--r-- | sys/dev/usb/uvideo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index abaf9ed5d9d..0d6c1fe6b5e 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.166 2011/10/28 12:48:31 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.167 2012/06/18 15:43:30 mpi Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -2775,7 +2775,7 @@ uvideo_enum_fmt(void *v, struct v4l2_fmtdesc *fmtdesc) /* type not supported */ return (EINVAL); - if (fmtdesc->index == sc->sc_fmtgrp_num) + if (fmtdesc->index >= sc->sc_fmtgrp_num) /* no more formats left */ return (EINVAL); idx = fmtdesc->index; |