Index: test/cctest/test-debug.cc |
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc |
index cd0da1b87a13e024482686c0397b8d2ff687a8be..d03785056d385f6f901e6ef6f2aa20070931ecf7 100644 |
--- a/test/cctest/test-debug.cc |
+++ b/test/cctest/test-debug.cc |
@@ -2202,9 +2202,8 @@ bool GetEvaluateStringResult(char *message, char* buffer, int buffer_size) { |
if (pos == NULL) { |
return false; |
} |
- Vector<char> buf(buffer, buffer_size); |
+ Vector<char> buf(buffer, buffer_size - 1); |
OS::StrNCpy(buf, pos, buffer_size); |
- buffer[buffer_size - 1] = '\0'; |
return true; |
} |