Index: runtime/bin/directory_macos.cc |
diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc |
index 20803c2c71b644d38117bf610b6e3e4a98214a30..88e430ba3b3af2e14d8ff1d02b4c9ea3140923ac 100644 |
--- a/runtime/bin/directory_macos.cc |
+++ b/runtime/bin/directory_macos.cc |
@@ -49,7 +49,7 @@ bool PathBuffer::Add(const char* name) { |
data[PATH_MAX] = '\0'; |
if (written <= PATH_MAX - length_ && |
written >= 0 && |
- static_cast<size_t>(written) == strnlen(name, PATH_MAX + 1)) { |
+ static_cast<size_t>(written) == strlen(name)) { |
length_ += written; |
return true; |
} else { |