[go: up one dir, main page]

Crash on path fills with a url without closing parenthesis

Summary:

Inkscape crashes when trying to open an svg file that contains a <path> with its fill set to url(anything-here without closing parenthesis.

Steps to reproduce:

> cat bug.svg
<svg xmlns="http://www.w3.org/2000/svg">
    <path fill="url(" />
</svg>

> inkscape bug.svg
SPIPaint::read: url is empty or invalid

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at https://inkscape.org/report
with a detailed description of the steps leading to the crash, so we can fix it.
Segmentation fault (core dumped)

The same happens when opening this file with a GUI, through File - Open.

What happened?

Inkscape crashes with a core dump.

What should have happened?

Inkscape should have shown an error message and not crash.

Sample attachments:

bug.svg

core.inkscape.1000.fee2e6aaa167499c823cc379a33591d9.8135.1662794653000000.zst

Version info

Inkscape 1.2.1 (9c6d41e410, 2022-07-14, custom)

    GLib version:     2.72.3
    GTK version:      3.24.34
    glibmm version:   2.66.4
    gtkmm version:    3.24.6
    libxml2 version:  2.10.2
    libxslt version:  1.1.37
    Cairo version:    1.17.6
    Pango version:    1.50.9
    HarfBuzz version: 5.1.0

    OS version:       Arch Linux

(the version from Arch package repos as of 2022-09-10)