projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5709a0
)
V4L/DVB (11991): buf-core.c: add pointer check
author
Figo.zhang
<figo1802@gmail.com>
Wed, 3 Jun 2009 02:01:04 +0000
(23:01 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Tue, 16 Jun 2009 22:07:51 +0000
(19:07 -0300)
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>
drivers/media/video/videobuf-core.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/videobuf-core.c
b/drivers/media/video/videobuf-core.c
index
48c3ebd
..
f1ccf98
100644
(file)
--- a/
drivers/media/video/videobuf-core.c
+++ b/
drivers/media/video/videobuf-core.c
@@
-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;