diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-04-07 14:01:48 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-08 21:32:53 +0400 |
commit | f1159d7cc01b2209d7005f1e7630647f2b012893 (patch) | |
tree | 02e14e85a73ab49f4bdaa149c185d2bae604fd10 /drivers/staging/cxt1e1 | |
parent | e8e1560a02a46b06071433d2478452985076f35f (diff) | |
download | linux-f1159d7cc01b2209d7005f1e7630647f2b012893.tar.xz |
Drivers: Staging: cxt1e1: strncpy issue, need set zero at the end.
need set '\0' at the end. or cause issue.
it is called by c4_ioctl in drivers/staging/cxt1e1/linux.c
all things need be initialized, before provide them to user mode.
so we can not use strlcpy instead of strncpy.
code style:
all contents of the file use 4 spaces instead of '\t',
so this patch has to follow, now.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/cxt1e1')
-rw-r--r-- | drivers/staging/cxt1e1/pmcc4_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c index 8a7b3a646451..8d8a22be5b2e 100644 --- a/drivers/staging/cxt1e1/pmcc4_drv.c +++ b/drivers/staging/cxt1e1/pmcc4_drv.c @@ -1545,6 +1545,7 @@ c4_get_iidinfo (ci_t * ci, struct sbe_iid_info * iip) np = dev->name; strncpy (iip->iname, np, CHNM_STRLEN - 1); + iip->iname[CHNM_STRLEN - 1] = '\0'; return 0; } |