Re: [PATCH v2] edac: edac_mc_sysfs.c: Use strlcpy to Copy a C-string into a sized buffer

2017-05-28 Thread Borislav Petkov
On Fri, May 26, 2017 at 09:10:21PM +0200, Karim Eshapa wrote: > Use strlcpy with sized buffer instead of strncpy to > avoid non NUL-terminated source strings problems. Huh? But it does get terminated. > Signed-off-by: Karim Eshapa > --- > drivers/edac/edac_mc_sysfs.c | 6 ++ > 1 file change

[PATCH v2] edac: edac_mc_sysfs.c: Use strlcpy to Copy a C-string into a sized buffer

2017-05-26 Thread Karim Eshapa
Use strlcpy with sized buffer instead of strncpy to avoid non NUL-terminated source strings problems. Signed-off-by: Karim Eshapa --- drivers/edac/edac_mc_sysfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c