aoe: use strscpy() to instead of strncpy()
Subsystems (2)
PATCH 1/1 aoe: use strscpy() to instead of strncpy()
From: Xu Panda <[email protected]>
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings.
Signed-off-by Xu Panda <[email protected]>
Signed-off-by Yang Yang <[email protected]>
--- drivers/block/aoe/aoenet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/aoe/aoenet.c +1 -2
@@ -39,8 +39,7 @@ static struct ktstate kts;#ifndef MODULE static int __init aoe_iflist_setup (char *str) { -strncpy (aoe_iflist, str,IFLISTSZ ); - aoe_iflist[IFLISTSZ -1 ] ='\0' ; +strscpy (aoe_iflist, str,IFLISTSZ );return 1 ; }
Signature · 1 line
2.15.2