aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-04 16:18:15 +0000
committerGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-04 16:18:15 +0000
commit305f78e8c18a26b7ead11758d6a4fa0519932cca (patch)
tree84ce0e834d8c52393c0b52190fa0583168304ffd /samplecode
parentfe2faa8b16e2a607543c5b30637e7da54012e169 (diff)
Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream.
BUG= R=reed@google.com Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12114 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleRegion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index 1bd316233f..39c27a8928 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -280,7 +280,7 @@ protected:
SkASSERT(size == size2);
SkRegion tmp3;
- SkDEBUGCODE(size2 = ) tmp3.readFromMemory(buffer);
+ SkDEBUGCODE(size2 = ) tmp3.readFromMemory(buffer, 1000);
SkASSERT(size == size2);
SkASSERT(tmp3 == tmp);