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

[REG 6.6.1 -> 6.7] rendering svg causes division by zero in getRadialGradientValues

    XMLWordPrintable

Details

    • 69bed6cd3 (dev), bd6a866fb (dev), 4596aa7bf (6.7)

    Description

      1. Have a build of Qt configured with "-sanitize undefined".
      2. Build the attached project with that.
      3. Run the resulting binary with the attached svg file as parameter.
        The sanitizer will show a division by zero:
        /home/qtrob/dev/src/qt-dev_12.21-base_imageformats_svg/qtbase/src/gui/painting/qdrawhelper.cpp:3416:18: runtime error: division by zero
        SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/qtrob/dev/src/qt-dev_12.21-base_imageformats_svg/qtbase/src/gui/painting/qdrawhelper.cpp:3416:18 in
        

      Google's oss-fuzz found this as issue 63780. Their report is public. It went to "Verified" state in November but I can still reproduce the issue with Qt's latest sources.

      Attachments

        1. 63780.svg
          0.1 kB
        2. CMakeLists.txt
          0.4 kB
        3. gradientdivisionbyzero.tar.xz
          4 kB
        4. main.cpp
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hatemelkharashy Hatem ElKharashy
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes