- 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> |
||
|---|---|---|
| .. | ||
| canbus | ||
| dummy | ||
| ethernet | ||
| ieee802154 | ||
| offloaded_netdev | ||
| openthread | ||
| ppp | ||
| virtual | ||
| wifi | ||
| CMakeLists.txt | ||
| Kconfig | ||