mirror of
https://github.com/apache/nuttx.git
synced 2026-08-14 08:53:15 +00:00
Add word-at-a-time strlcpy using DETECTNULL for both the copy phase and the strlen tail when truncated. The copy loop aligns src and processes a register at a time, falling to bytewise for the last word containing the terminator. When truncated, the remaining src length is measured with a second word-at-a-time loop. strlcpy has 46 call sites in a typical kernel image (more than strcpy) and is not covered by newlib OPTSPEED, making it a high-value target. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: ganjing <ganjing@xiaomi.com> |
||
|---|---|---|
| .. | ||
| libbuiltin | ||
| libc | ||
| libdsp | ||
| libm | ||
| libnx | ||
| libxx | ||
| CMakeLists.txt | ||