PR c/81117 - Improve buffer overflow checking in strncpy