Index: core/fpdfdoc/cpdf_interform.cpp |
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp |
index c32398660389af63e526850eacc0c7fc0f798ec2..e574e28fe5a67e5129ac8cfa2866e32a0418eaba 100644 |
--- a/core/fpdfdoc/cpdf_interform.cpp |
+++ b/core/fpdfdoc/cpdf_interform.cpp |
@@ -1079,8 +1079,12 @@ void CPDF_InterForm::FixPageFields(const CPDF_Page* pPage) { |
} |
CPDF_FormField* CPDF_InterForm::AddTerminalField(CPDF_Dictionary* pFieldDict) { |
- if (!pFieldDict->KeyExist("T")) |
- return nullptr; |
+ if (!pFieldDict->KeyExist("FT")) { |
+ // Key "FT" is required for terminal fields, it is also inheritable. |
+ CPDF_Dictionary* pParentDict = pFieldDict->GetDictFor("Parent"); |
+ if (!pParentDict || !pParentDict->KeyExist("FT")) |
+ return nullptr; |
+ } |
CPDF_Dictionary* pDict = pFieldDict; |
CFX_WideString csWName = FPDF_GetFullName(pFieldDict); |