diff mbox

[05/11] drivers/media/video/au0828/au0828-video.c: off by one bug

Message ID 201004272111.o3RLBMrP019991@imap1.linux-foundation.org (mailing list archive)
State Accepted
Headers show

Commit Message

Andrew Morton April 27, 2010, 9:11 p.m. UTC
None
diff mbox

Patch

diff -puN drivers/media/video/au0828/au0828-video.c~drivers-media-video-au0828-au0828-videoc-off-by-one-bug drivers/media/video/au0828/au0828-video.c
--- a/drivers/media/video/au0828/au0828-video.c~drivers-media-video-au0828-au0828-videoc-off-by-one-bug
+++ a/drivers/media/video/au0828/au0828-video.c
@@ -1105,7 +1105,7 @@  static int vidioc_enum_input(struct file
 
 	tmp = input->index;
 
-	if (tmp > AU0828_MAX_INPUT)
+	if (tmp >= AU0828_MAX_INPUT)
 		return -EINVAL;
 	if (AUVI_INPUT(tmp).type == 0)
 		return -EINVAL;