can detect violations of this rule with CERT C Rule Pack
Section
Compass/ROSE
Section
could detect violations in the following manner: All calls to strncpy() and the other functions should be follwed by an assignment of a terminating character to null-terminate the string