diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-08-22 21:41:03 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-08-22 21:41:03 +0200 |
commit | 2b4a8c362a2f964ce7f6689f4eea3d7552f77e64 (patch) | |
tree | 6211888a6593ad3f8c0a2d3f1167b7d00185cfdf /linux/drivers | |
parent | 4b4308a282febbfa29eb4779f76fc3fd3467e8b3 (diff) | |
download | mediapointer-dvb-s2-2b4a8c362a2f964ce7f6689f4eea3d7552f77e64.tar.gz mediapointer-dvb-s2-2b4a8c362a2f964ce7f6689f4eea3d7552f77e64.tar.bz2 |
V4L: check inval in video_register_device_index()
From: Henrik Kretzschmar <henne@nachtwindheim.de>
Better check the video_device pointer before using it.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/v4l2-dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/v4l2-dev.c b/linux/drivers/media/video/v4l2-dev.c index 594f2477f..a3d52e7f7 100644 --- a/linux/drivers/media/video/v4l2-dev.c +++ b/linux/drivers/media/video/v4l2-dev.c @@ -292,6 +292,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, int ret; char *name_base; + if (vfd == NULL) + return -EINVAL; + switch (type) { case VFL_TYPE_GRABBER: base = MINOR_VFL_TYPE_GRABBER_MIN; |