Skip to content
Commit d5a458df authored by Pisit Sawangvonganan's avatar Pisit Sawangvonganan Committed by Alberto Escolar
Browse files

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: default avatarPisit Sawangvonganan <pisit@ndrsolution.com>
parent c20126f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment