Closed
Description
Core Version: 2.3.0
According to the C standard, strncpy(dst, src, count)
always writes exactly count
bytes to dst
, padding with zeroes after src
has been copied.
The current implementation of strncpy_P
doesn't do that, it just stops after copying src
and the terminating zero. Code relying on the trailing zeroes works well with strncpy
, but it doesn't work with strncpy_P
.