Index: runtime/bin/directory_macos.cc |
diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc |
index d31f2206b098c2e30edfd46d6eb4fabe6a902a65..5757a9c1a05075795acf968827ede4c2c4fa463d 100644 |
--- a/runtime/bin/directory_macos.cc |
+++ b/runtime/bin/directory_macos.cc |
@@ -393,7 +393,7 @@ char* Directory::CreateTemp(const char* const_template, bool system) { |
if (result == NULL) { |
return NULL; |
} |
- int length = strnlen(path.AsString(), PATH_MAX); |
+ int length = strlen(path.AsString()); |
result = static_cast<char*>(malloc(length + 1)); |
strncpy(result, path.AsString(), length); |
result[length] = '\0'; |