diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-03 02:01:04 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-03 02:01:04 +0000 |
commit | edb804f93fd68c190d3c43e606f31c806343d647 (patch) | |
tree | 2056fae8e80f6d54b4b335d2bb807eec14a310c0 /linux/drivers/media | |
parent | 6c59e2781795481200d573e3a4ef8b033924987a (diff) | |
download | mediapointer-dvb-s2-edb804f93fd68c190d3c43e606f31c806343d647.tar.gz mediapointer-dvb-s2-edb804f93fd68c190d3c43e606f31c806343d647.tar.bz2 |
buf-core.c: add pointer check
From: Figo.zhang <figo1802@gmail.com>
add poiter check for videobuf_queue_core_init().
any guys who write a v4l driver, pass a NULL pointer or a non-inintial
pointer to the first parameter such as videobuf_queue_sg_init() , it
would be crashed.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/videobuf-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c index e9696385d..faf912403 100644 --- a/linux/drivers/media/video/videobuf-core.c +++ b/linux/drivers/media/video/videobuf-core.c @@ -119,6 +119,7 @@ void videobuf_queue_core_init(struct videobuf_queue *q, void *priv, struct videobuf_qtype_ops *int_ops) { + BUG_ON(!q); memset(q, 0, sizeof(*q)); q->irqlock = irqlock; q->dev = dev; |