You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: SVG marker images skip the XML namespace limit #3220
rustgis_data::xml::parse refuses a document whose namespaces would take too long to resolve, but the SVG marker reader (svg::read, crates/render/src/picture/svg.rs) parses without that check. Such an SVG is accepted as a marker image after seconds of work.
Steps to reproduce
Run picture_marker_check on this SVG:
let ns:String = (0..3000).map(|i| format!(r#" xmlns:n{i}="u{i}""#)).collect();let body = r#"<g xmlns:a="v"/>"#.repeat(1000);let svg = format!(r##"<svg xmlns="http://www.w3.org/2000/svg"{ns} viewBox="0 0 8 4">{body}<rect width="8" height="4"/></svg>"##);
Measured in a test build: 250 children (61,872 bytes) 4.0 s, 500 (65,872) 4.8 s, 1,000 (73,872) 7.5 s, all accepted.
Expected behavior
The image is refused as too much to read, as other XML readers refuse such a document.
Activity
jgregoriorincon commentedon Nov 28, 2026
I'll take this one.