dect
/
linux-2.6
Archived
13
0
Fork 0

V4L/DVB (11991): buf-core.c: add pointer check

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>
This commit is contained in:
Figo.zhang 2009-06-02 23:01:04 -03:00 committed by Mauro Carvalho Chehab
parent d5709a0e3d
commit 96ceea2734
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,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;