commit | 6beab305c5adf933c4da3b15e571cb26c1d096f7 | [log] [tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Thu Sep 02 16:34:42 2021 +0000 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Sep 02 16:34:42 2021 +0000 |
tree | 464ac9fd6ce33fb3cd8949b80818d8d5bf4140c4 | |
parent | 6e74cd2dd5fb24b57dca4583ebe3a02ff3039113 [diff] |
Zero out-params in CPDF_SeparationCS::GetRGB(). Bug was introduced in https://pdfium-review.googlesource.com/c/pdfium/+/2991 when we converted some out-paramters from refernces to pointers. The current code nulls the pointers rather than zeroing the pointed-to RGB values. Not all callers check the return value, but we do return false without zeroing in other blocks, so the consequences are likely to be minimal. Change-Id: Ia6d29328af1ec65ed4b523b60bf8b8190b70198b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84730 Auto-Submit: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_colorspace.cpp b/core/fpdfapi/page/cpdf_colorspace.cpp index 2eef08b..bdbc335 100644 --- a/core/fpdfapi/page/cpdf_colorspace.cpp +++ b/core/fpdfapi/page/cpdf_colorspace.cpp
@@ -1249,9 +1249,9 @@ if (m_pBaseCS) return m_pBaseCS->GetRGB(results, R, G, B); - R = 0; - G = 0; - B = 0; + *R = 0.0f; + *G = 0.0f; + *B = 0.0f; return false; }