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
|
||
|---|---|---|
| .. | ||
| drivers | ||
| skas | ||
| Makefile | ||
| elf_aux.c | ||
| execvp.c | ||
| file.c | ||
| helper.c | ||
| irq.c | ||
| main.c | ||
| mem.c | ||
| process.c | ||
| registers.c | ||
| sigio.c | ||
| signal.c | ||
| start_up.c | ||
| time.c | ||
| tty.c | ||
| umid.c | ||
| user_syms.c | ||
| util.c | ||