samsonov added a comment. Um, I think we need unit tests for this, they should go to lib/sanitizer_common/tests Do you plan to actually replace internal_strncpy / internal_strncat in the subsequent changes? http://reviews.llvm.org/D14714