* [patch] v4l/bttv: add sanity check (bug #3309)
[not found] <20040830025443.3aad9fa4.akpm@osdl.org>
@ 2004-08-30 12:52 ` Gerd Knorr
0 siblings, 0 replies; only message in thread
From: Gerd Knorr @ 2004-08-30 12:52 UTC (permalink / raw)
To: Andrew Morton; +Cc: Kernel List
> 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
diff -u linux-2.6.9-rc1/drivers/media/video/bttv-driver.c linux/drivers/media/video/bttv-driver.c
--- linux-2.6.9-rc1/drivers/media/video/bttv-driver.c 2004-08-25 18:23:10.000000000 +0200
+++ linux/drivers/media/video/bttv-driver.c 2004-08-30 14:42:43.321218189 +0200
@@ -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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-30 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20040830025443.3aad9fa4.akpm@osdl.org>
2004-08-30 12:52 ` [patch] v4l/bttv: add sanity check (bug #3309) Gerd Knorr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox