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

Unified Diff: include/core/SkPath.h

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: Adding length info to read operations 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
Index: include/core/SkPath.h
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index a6674d9afb4e65cc024ee8a155d5f4f4b4869bfe..a7cff00c8ca49f7c0e60c0dad4dae8a4e6d9b341 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -918,7 +918,7 @@ public:
* Initialized the region from the buffer, returning the number
* of bytes actually read.
*/
- uint32_t readFromMemory(const void* buffer);
+ uint32_t readFromMemory(const void* buffer, uint32_t length);
#ifdef SK_BUILD_FOR_ANDROID
uint32_t getGenerationID() const;

Powered by Google App Engine
This is Rietveld 408576698