commit | d5a458df2e7336d64ce8e2d4a436b7701c842f66 | [log] [tgz] |
---|---|---|
author | Pisit Sawangvonganan <pisit@ndrsolution.com> | Sat Aug 10 10:49:21 2024 +0700 |
committer | Alberto Escolar <alberto.escolar.piedras@nordicsemi.no> | Wed Aug 14 09:40:23 2024 +0200 |
tree | 3bc3a50f5952c1d74683d76d5b4e7f83fedafd23 | |
parent | c20126f950130943a56f9b2b1c36029b479807e0 [diff] |
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>