v4l/bttv: add sanity check (bug #3309)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 v4l/bttv: add sanity check (bug #3309)
Quoted 8 lines
Software Environment: gnomemeeting
Problem Description: I have a miropctv (bttv card=1), kernel serie 2.4 have v4l only implementation. Kernel serie 2.6 have v4l2 only implementation (v4l broken). I had to go back to 2.4 to use gnomemeeting (v4l only). Everything is fine in 2.4.x. With 2.6, programs using v4l2 works ok (xawtv, ...); and programs using v4l crash:Aug 25 19:20:19 zain kernel: kernel BUG at drivers/media/video/bttv-driver.c:1900!
Missing sanity check, overlay is supported for packed pixel formats only. Patch below. It's not API related btw, the bug can be triggered using the v4l2 API as well.
Gerd
drivers/media/video/bttv-driver.c +2 -0
@@ -1861,6 +1861,8 @@if (NULL == fh->ovfmt)return -EINVAL ; +if (!(fh->ovfmt->flags &FORMAT_FLAGS_PACKED )) +return -EINVAL ; retval =verify_window (&bttv_tvnorms[btv->tvnorm],win,fixup);if (0 != retval)return retval;