On Mon, 16 Oct 2023 21:31:29 +0530 Jerin Jacob <jerinjac...@gmail.com> wrote:
> ### [PATCH] app/graph: add telnet connectivity framework > > WARNING:STRNCPY: Prefer strscpy, strscpy_pad, or __nonstring over > strncpy - see: https://github.com/KSPP/linux/issues/90 > #205: FILE: app/graph/conn.c:162: > + strncpy(conn->welcome, p->welcome, CONN_WELCOME_LEN_MAX); > > WARNING:STRNCPY: Prefer strscpy, strscpy_pad, or __nonstring over > strncpy - see: https://github.com/KSPP/linux/issues/90 > #206: FILE: app/graph/conn.c:163: > + strncpy(conn->prompt, p->prompt, CONN_PROMPT_LEN_MAX); > > total: 0 errors, 2 warnings, 554 lines checked These are from the kernel version of checkpatch which now is pushing developers towards replacement kernel apis. For DPDK though you should be using strlcpy() in most places to avoid the missing null end of string on copy of full size.