commit | 7f0bb5197ed133c92ceac8c0009f569caea4f065 | [log] [tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Thu Sep 08 23:45:54 2022 +0000 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Sep 08 23:45:54 2022 +0000 |
tree | 755335335013bfbf32820b1abb68bd4c45350b14 | |
parent | 497f077a1d46bfeacb4eef83b223ae7b0fc51137 [diff] |
[M104] Avoid de-referencing end() in GetNextAvailContentHeight(). Add the same HasCurrentViewRecord() check as in other methods. Bug: chromium:1355682 Change-Id: I466f386f037801daa82ead30239f34e025748748 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96910 Reviewed-by: Lei Zhang <thestig@chromium.org> Auto-Submit: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> (cherry picked from commit 0d76a139d7ffbbdfb0ef5f5e714597a25f9767c4) Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/97738 Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp b/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp index d042c37..ac43d9c 100644 --- a/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp +++ b/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp
@@ -1523,6 +1523,8 @@ } bool CXFA_ViewLayoutProcessor::GetNextAvailContentHeight(float fChildHeight) { + if (!HasCurrentViewRecord()) + return false; CXFA_Node* pCurContentNode = GetCurrentViewRecord()->pCurContentArea->GetFormNode(); if (!pCurContentNode)