Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64425

Segmentation fault for malformed svg (loop)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.4
    • 5.6.3
    • SVG Support
    • None
    • Tested in Linux,  Windows & Mac

    Description

      This piece of code gives Segmentation Fault for a particular ill-formed svg: 

      #include <QSize>
      #include <QImage>
      #include <QString>
      int main(int argc, char *argv[])
      {
       QImage* image = new QImage(QString::fromUtf8("malformed.svg"));
      }
      

       The svg is as simple as it gets (with a loop in it):

      <svg>
       <g id="0"><use xlink:href="#0" /></g>
      </svg>

      Works fine in Qt 5.4 & Qt5.8.0. Fails for  5.5.1, 5.6.2 & 5.6.3

      Seems pretty similar to: https://bugreports.qt.io/browse/QTBUG-35387

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            polm Pol M
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes