fix(xfa): initialize stripping parser options completely

This commit is contained in:
Mex authored and GitHub committed 2026-11-14 20:19:47 +01:00
1 parent b45fcae35d
commit d47a987e4c
1 file changed
+1 -1
+1 -1
View File
@@ -151,7 +151,7 @@ pub fn strip(doc: &mut Document) -> Result<Stripped, XfaError> {
}
// One XDP: the packets it holds are the envelope's children.
let text = s.decoded_within(64 << 20).ok().and_then(|b| crate::packets::decode(&b)).map(|(t, _)| t).unwrap_or_default();
let opts = crate::xml::ParsingOptions { allow_dtd: false, nodes_limit: 1_000_000, ..Default::default() };
let opts = crate::xml::ParsingOptions { allow_dtd: false, nodes_limit: 1_000_000 };
if crate::xml_nesting_depth(&text) <= crate::MAX_XML_DEPTH
&& let Ok(parsed) = crate::xml::Document::parse_with_options(&text, opts)
{