GNOME Bugzilla – Bug 672212
librsvg crashes on handling svg with <script>
Last modified: 2012-03-16 12:22:56 UTC
Original report: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/955927 On my 11.04 system if I have the following svg file in a directory: <svg><script>alert(4);</script></svg> (say in a file called 'svg.svg') when I go and preview it (I found that I sometimes have to copy it / move around to get trigger nautlius to trigger the 'preview' view) nautilus reliably crashes. (The backtrace suggests that it might be a bug in librsvg-2.so.2). Here is some gdb output: Program received signal SIGSEGV, Segmentation fault.
+ Trace 229891
Thread 140315977721600 (LWP 29529)
a command file or a user-defined command. (gdb) i frame Stack level 0, frame at 0x7f9ddc0207f0: rip = 0x7f9de62045c9 in g_hash_table_size; saved rip 0x7f9dd5464045 called by frame at 0x7f9ddc020810 Arglist at 0x7f9ddc0207d8, args: Locals at 0x7f9ddc0207d8, Previous frame's sp is 0x7f9ddc0207f0 Saved registers: rip at 0x7f9ddc0207e8
Not reproducible using librsvg 2.35.2 / git master. Also, this bug report is incomplete. I had to go to the launchpad bug to find the testcase; please *always* make upstream bugs have a *complete* record of all relevant information from the downstream bug.
Sorry, that last paragraph wasn't for this bug... this one does have the testcase here :-)