diff options
author | Brian Salomon <bsalomon@google.com> | 2017-03-22 17:50:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-23 15:45:57 +0000 |
commit | e01187e059c5865416e0afbaa86c3c11cdc5dd25 (patch) | |
tree | dddc21693500abd8122eac8473bc3839f17124ed /src/gpu/GrStencilSettings.cpp | |
parent | 468fd63760283c56630d752583b234f44ab03024 (diff) |
Fix MSAN issue found by fuzzer in GrStencilSettings::operator==
Change-Id: Iebe46b1ec79f7746631cf1836b896d1a39b30d08
Reviewed-on: https://skia-review.googlesource.com/10029
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrStencilSettings.cpp')
-rw-r--r-- | src/gpu/GrStencilSettings.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/GrStencilSettings.cpp b/src/gpu/GrStencilSettings.cpp index cec8bee97b..7790c5506b 100644 --- a/src/gpu/GrStencilSettings.cpp +++ b/src/gpu/GrStencilSettings.cpp @@ -78,6 +78,8 @@ bool GrStencilSettings::operator==(const GrStencilSettings& that) const { } if (kSingleSided_StencilFlag & (fFlags & that.fFlags)) { return 0 == memcmp(&fFront, &that.fFront, sizeof(Face)); // Both are single sided. + } else if (kSingleSided_StencilFlag & (fFlags | that.fFlags)) { + return false; } else { return 0 == memcmp(&fFront, &that.fFront, 2 * sizeof(Face)); GR_STATIC_ASSERT(sizeof(Face) == |