Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: test/cctest/test-debug.cc

Issue 545118: Re-Fix DebugEvaluateWithoutStack test on Windows (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index d03785056d385f6f901e6ef6f2aa20070931ecf7..b69ecccd6b791aeea40694d47368e47b7605f929 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -2202,8 +2202,9 @@ bool GetEvaluateStringResult(char *message, char* buffer, int buffer_size) {
if (pos == NULL) {
return false;
}
- Vector<char> buf(buffer, buffer_size - 1);
- OS::StrNCpy(buf, pos, buffer_size);
+ Vector<char> buf(buffer, buffer_size);
+ OS::StrNCpy(buf, pos, buffer_size - 1);
+ buffer[buffer_size - 1] = '\0';
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698