commit | 5fcd7aab39b8afacd2260b4f0448a6ef7efe02fd | [log] [tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Wed Jul 10 18:04:16 2019 +0000 |
committer | Chromium commit bot <commit-bot@chromium.org> | Wed Jul 10 18:04:16 2019 +0000 |
tree | 72046e1e400b8e6dd8827930a37a24f320632cb4 | |
parent | a00f36f62b33b52c7ff939219261c18045ba00ac [diff] |
Zero-fill PatternValue::m_Comps Unlike std::vector<> upon resizing, std::array<> doesn't zero-initialize its members, so we need to do this explicitly. Bug: chromium:982768 Change-Id: I9f2a5bb76ecd5c2c1ecbf74d23052f73b88c2562 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57570 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp index 9e1dab4..3f88149 100644 --- a/core/fpdfapi/page/cpdf_colorspace.cpp +++ b/core/fpdfapi/page/cpdf_colorspace.cpp
@@ -442,7 +442,9 @@ } // namespace -PatternValue::PatternValue() = default; +PatternValue::PatternValue() { + std::fill(std::begin(m_Comps), std::end(m_Comps), 0.0f); +} PatternValue::PatternValue(const PatternValue& that) = default;