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

Unified Diff: src/core/SkValidatingReadBuffer.cpp

Issue 106943002: Fixed a few places where uninitialized memory could have been read (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Removed bad scalar checks in SkColorMatrixFilter.cpp Created 7 years 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: src/core/SkValidatingReadBuffer.cpp
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index 4a8ac472472fcbd0edcc77a1d4021ac164df5c9b..692d0dd4d18c83b0f7f5bd13e0bc229ba478253a 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -29,6 +29,10 @@ bool SkValidatingReadBuffer::validate(bool isValid) {
return !fError;
}
+bool SkValidatingReadBuffer::isValid() const {
+ return !fError;
+}
+
void SkValidatingReadBuffer::setMemory(const void* data, size_t size) {
this->validate(IsPtrAlign4(data) && (SkAlign4(size) == size));
if (!fError) {

Powered by Google App Engine
This is Rietveld 408576698