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;