projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9338348
)
Added count validation in SkImageFilter::Common::unflatten()
author
sugoi
<sugoi@chromium.org>
Tue, 22 Jul 2014 14:26:35 +0000
(07:26 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Tue, 22 Jul 2014 14:26:35 +0000
(07:26 -0700)
BUG=395641
R=reed@google.com, senorblanco@google.com, senorblanco@chromium.org
Author: sugoi@chromium.org
Review URL: https://codereview.chromium.org/
405983006
src/core/SkImageFilter.cpp
patch
|
blob
|
history
diff --git
a/src/core/SkImageFilter.cpp
b/src/core/SkImageFilter.cpp
index
3eb688e
..
11a1420
100644
(file)
--- a/
src/core/SkImageFilter.cpp
+++ b/
src/core/SkImageFilter.cpp
@@
-44,7
+44,7
@@
bool SkImageFilter::Common::unflatten(SkReadBuffer& buffer, int expectedCount) {
if (expectedCount < 0) { // means the caller doesn't care how many
expectedCount = count;
}
- if (!buffer.validate(
count == expectedCount
)) {
+ if (!buffer.validate(
(count == expectedCount) && (count >= 0)
)) {
return false;
}