Chromium Code Reviews| Index: src/common/mac/file_id.cc |
| diff --git a/src/common/mac/file_id.cc b/src/common/mac/file_id.cc |
| index c5d7ed56baf6cc86e2ae77038b7f1a341b42a294..dbec32953e674956d6140b0f09c6aa0cd657b040 100644 |
| --- a/src/common/mac/file_id.cc |
| +++ b/src/common/mac/file_id.cc |
| @@ -45,7 +45,7 @@ using MacFileUtilities::MachoID; |
| namespace google_breakpad { |
| FileID::FileID(const char *path) { |
| - strlcpy(path_, path, sizeof(path_)); |
| + strncpy(path_, path, sizeof(path_) - 1); |
|
Mark Mentovai
2015/09/11 15:49:50
strlcpy() guarantees NUL-termination, but strncpy(
Ted Mielczarek
2015/09/15 12:58:36
Done.
|
| } |
| bool FileID::FileIdentifier(unsigned char identifier[16]) { |