diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-06 10:20:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:05 -0400 |
commit | 845f16abad37e2a255ac1c167375f6588502f93f (patch) | |
tree | 2715019d91f4d0f7e309b36ffdb64de223ddf327 /include | |
parent | 5e87efa3b29c105f81fea785babafb098e4e046d (diff) |
V4L/DVB (4070): Zoran strncpy() fix
The zoran driver uses strncpy() in an unsafe way. This patch uses the proper
sizeof()-1 size parameter. Since all strncpy() targets are initialised with
memset() the trailing '\0' is already set. Where std->name was the target for
the strncpy() we overwrote 8 Bytes of the std structure with zeros.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/videodev2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 795831d9f4d4..bc957d83a127 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -14,7 +14,9 @@ | |||
14 | */ | 14 | */ |
15 | #ifndef __LINUX_VIDEODEV2_H | 15 | #ifndef __LINUX_VIDEODEV2_H |
16 | #define __LINUX_VIDEODEV2_H | 16 | #define __LINUX_VIDEODEV2_H |
17 | #ifdef __KERNEL__ | ||
17 | #include <linux/time.h> /* need struct timeval */ | 18 | #include <linux/time.h> /* need struct timeval */ |
19 | #endif | ||
18 | #include <linux/types.h> | 20 | #include <linux/types.h> |
19 | #include <linux/compiler.h> /* need __user */ | 21 | #include <linux/compiler.h> /* need __user */ |
20 | 22 | ||