Off by one is the sign of real programmer Ronald Bultje wrote: > Hi Gerd et all, > > I think there's a off-by-one error in bttv-driver.c (bttv 0.8.37): > [..] > if (b->index < 0 || b->index > VIDEO_MAX_FRAME) > return -EINVAL; > [..] > twice, once for VIDIOC_QUERYBUF and once for VIDIOC_QBUF (both in the > ioctl handler function in bttv-driver.c). It should be "b->index >= > VIDEO_MAX_FRAME" instead of "b->index > VIDEO_MAX_FRAME". > > Attached is a small patch to correct that. > > Ronald > > -- > - .-. > - /V\ | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx> > - // \\ | Running: Linux 2.4.18-XFS and OpenBSD 3.0 > - /( )\ | http://ronald.bitfreak.net/ > - ^^-^^ > > ------------------------------------------------------------------------ > Name: bttv-off-by-one.patch > bttv-off-by-one.patch Type: Plain Text (text/plain) > Encoding: quoted-printable