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

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

Issue 11961012: Avoid pointer underflow in CopyCharsUnsigned. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix indentation Created 7 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 | « src/v8utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 226d01db62955e0b76d91c14bb89b9fe245a8f30..04664ce2c8e34ee9f346ce250546140a26cf1ed6 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -6203,6 +6203,10 @@ THREADED_TEST(StringWrite) {
CHECK_EQ(0, strcmp("abc", buf));
CHECK_EQ(0, buf[3]);
CHECK_EQ(0, strcmp("def", buf + 4));
+
+ CHECK_EQ(0, str->WriteAscii(NULL, 0, 0, String::NO_NULL_TERMINATION));
+ CHECK_EQ(0, str->WriteUtf8(NULL, 0, 0, String::NO_NULL_TERMINATION));
+ CHECK_EQ(0, str->Write(NULL, 0, 0, String::NO_NULL_TERMINATION));
}
@@ -18127,4 +18131,5 @@ class ThreadInterruptTest {
THREADED_TEST(SemaphoreInterruption) {
ThreadInterruptTest().RunTest();
}
+
#endif // WIN32
« no previous file with comments | « src/v8utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698