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

Unified Diff: tests/PathTest.cpp

Issue 41253002: Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Removing SkMatrix's writeToMemory, readFromMemory Created 7 years, 2 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
« include/core/SkWriter32.h ('K') | « tests/MatrixTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index c47b2c4858d6f9ff3f2351c4a2db25fe484ca8aa..ab0bcd52b3fe205678e04acbd140d8c69e1fcb75 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -1763,7 +1763,7 @@ static void test_flattening(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, size1 == size2);
SkPath p2;
- uint32_t size3 = p2.readFromMemory(buffer);
+ uint32_t size3 = p2.readFromMemory(buffer, 1024);
REPORTER_ASSERT(reporter, size1 == size3);
REPORTER_ASSERT(reporter, p == p2);
« include/core/SkWriter32.h ('K') | « tests/MatrixTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698