Skip to content
Commit 979a459c authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Jason Gunthorpe
Browse files

IB/cma: use strlcpy() instead of strncpy()



gcc-8 reports

drivers/infiniband/core/cma_configfs.c: In function 'make_cma_dev':
./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
bound 64 equals destination size [-Wstringop-truncation]

We need to use strlcpy() to make sure the string is nul-terminated.

Signed-off-by: default avatarXiongfeng Wang <xiongfeng.wang@linaro.org>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent a6532e71
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment