commit | 8f99374cbe5dd5a7737133d26c52316939a86a17 | [log] [tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Fri Sep 09 00:18:24 2022 +0000 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 09 00:18:24 2022 +0000 |
tree | 893fe1959956bd3032bf663d406028406b0249da | |
parent | e5664aceeffbeba83e402776fc5eca0e95c27eb6 [diff] |
[M105] 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/+/97737
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)