mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
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>
This commit is contained in:
parent
e8e1560a02
commit
f1159d7cc0
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue