net: l2: ppp: ensure proper null-termination in `ppp_fsm_close`
- 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>
Loading
Please sign in to comment