From 845f16abad37e2a255ac1c167375f6588502f93f Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Tue, 6 Jun 2006 11:20:08 -0300 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/videodev2.h') diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 795831d..bc957d8 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -14,7 +14,9 @@ */ #ifndef __LINUX_VIDEODEV2_H #define __LINUX_VIDEODEV2_H +#ifdef __KERNEL__ #include /* need struct timeval */ +#endif #include #include /* need __user */ -- cgit v1.1