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

Unified Diff: include/core/SkFlattenableSerialization.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Adding validation helper file Created 7 years, 3 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/SkFlattenableSerialization.h
diff --git a/include/core/SkFlattenableSerialization.h b/include/core/SkFlattenableSerialization.h
index 2ed244c1ed1d0d6e5f3f45894151da3c8afa7388..33bbb38a9b7e077094021464870af9f04ab2bc83 100644
--- a/include/core/SkFlattenableSerialization.h
+++ b/include/core/SkFlattenableSerialization.h
@@ -13,7 +13,13 @@
class SkData;
class SkFlattenable;
-SK_API SkData* SkSerializeFlattenable(SkFlattenable*);
-SK_API SkFlattenable* SkDeserializeFlattenable(const void* data, size_t size);
+/**
+ * These utility functions are used by the chromium codebase to safely
+ * serialize and deserialize SkFlattenable objects. These aren't made for
+ * optimal speed, but rather designed with security in mind in order to
+ * prevent Skia from being an entry point for potential attacks.
+ */
+SK_API SkData* SkValidatingSerializeFlattenable(SkFlattenable*);
+SK_API SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_t size);
#endif

Powered by Google App Engine
This is Rietveld 408576698