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

The module does not handle out of range values properly

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • None
    • SVG Support
    • None

      In Svg, properties with numerical values can be represented as floats or ints. An Svg file can set properties to a value that's out of an int or float limit. In this case, those values should be stored in a larger variable and kept like this during any intermediate operations. Only when the rendering step happens, the renderer, depending on the device capabilities, can clamp those values. The resulting behaviour might be different across different renderers.

      https://www.w3.org/TR/SVG/types.html#RangeClamping

      In the case of Qt Svg, which uses QPainter, the values should be checked if they are within the range of QT_RASTER_COORD_LIMIT. This should be a proper check since QPainter does not guarantee the rendering results will be correct outside of this limit.

      This problem existed since Qt 5.15, and it was only noticeable in Qt 6.10 debug builds since the geometry classes started using QCheckedInt internally which fires an assertion in debug builds.

       

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

            hatemelkharashy Hatem ElKharashy
            hatemelkharashy Hatem ElKharashy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes