GNOME Bugzilla – Bug 361267
SVGs with duplicate IDs cause Nautilus/eog to crash
Last modified: 2006-11-03 06:07:04 UTC
Forwarded from: https://launchpad.net/distros/ubuntu/+source/librsvg2/+bug/35434 Attempting to render an SVG which attempts to <use> a duplicate ID causes the application to crash (Nautilus, eog, whatever). The following code,for example triggers the bug: <svg> <defs> <polygon id="buggy" /> </defs> <g id="buggy"> <use xlink:href="#buggy" /> </g> </svg> That code is bad and wrong, but shouldn't cause a segfault in the calling application! It took quite some time to work out that it was in fact that problem causing Nautilus to be unable to start (I had an offending SVG on my desktop). Should be pretty easy to fix, I think. Note: the original reporter indicated the bug was in package 'librsvg2'; however, that package was not published in Ubuntu. An offending file: http://librarian.launchpad.net/4730014/test.svg Backtrace:
+ Trace 75688
... The backtrace goes on and on for pages like that :-)
Right, as it would try to render the <g> that included the <use>, which referenced the same <g>... recursively until some resource gave. We might be able to track recursive draws, and thus draw nothing. Decreasing severity, as this can't happen on valid XML documents.
Fixed. Should be in 2.16.1
Super! Thanks for your work! :-)