Fix unqualified strncpy call

This commit is contained in:
David Tolnay 2020-10-31 16:08:04 -07:00
parent cc1ae76bd0
commit 504cf3cfb8
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -167,7 +167,7 @@ std::ostream &operator<<(std::ostream &os, const Str &s) {
extern "C" {
const char *cxxbridge05$error(const char *ptr, size_t len) {
char *copy = new char[len];
strncpy(copy, ptr, len);
std::strncpy(copy, ptr, len);
return copy;
}
} // extern "C"