mirror of https://github.com/torvalds/linux.git
`strncpy` is deprecated for use on NUL-terminated destination strings [1].
`gate_buf` should always be NUL-terminated and does not require
NUL-padding. It is used as a string arg inside an argv array given to
`run_helper()`. Due to this, let's use `strscpy` as it guarantees
NUL-terminated on the destination buffer preventing potential buffer
overreads [2].
This exact invocation was changed from `strcpy` to `strncpy` in commit
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| etap.h | ||
| ethertap_kern.c | ||
| ethertap_user.c | ||
| tuntap.h | ||
| tuntap_kern.c | ||
| tuntap_user.c | ||