- Remove the `strlen`, as it is unnecessary for safe copying. - Limit the `strncpy` to `sizeof(fsm->terminate_reason) - 1` to ensure the last byte is reserved for null-termination. - Add an explicit null terminator to guarantee correct string termination. Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| fsm.c | ||
| ipcp.c | ||
| ipv6cp.c | ||
| Kconfig | ||
| lcp.c | ||
| link.c | ||
| misc.c | ||
| network.c | ||
| options.c | ||
| pap.c | ||
| ppp_internal.h | ||
| ppp_l2.c | ||
| ppp_mgmt.c | ||
| ppp_stats.c | ||
| ppp_stats.h | ||