Uploaded image for project: 'Qt Safe Renderer'
  1. Qt Safe Renderer
  2. QSR-1317

Buffer for Dynamic Text was allocated too late

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: QSR 1.2, QSR 2.0 Alpha 1
    • Fix Version/s: QSR 2.0
    • Component/s: Runtime
    • Labels:
      None
    • Platform/s:
      All

      Description

      While drawing a dynamic text, there was a memset() in the beginning of QSafeTextLayout::update() method, which had NULL pointer, but luckily 0 length too, so no memory was actually touched. The reason for NULL and 0 is that the memory was actually allocated later in drawGlyph() method.

      Neither Valgrind nor Polyspace saw this as a problem as NULL pointer was not dereferenced and nothing bad happened, but is was still not the intended functionality.

      Found when replacing the memset() with a loop to copy m_fillColor to the allocated dynamic text bitmap.

        TestRail: Results

          Attachments

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

            Activity

              People

              Assignee:
              jani.launonen Jani Launonen (Inactive)
              Reporter:
              jani.launonen Jani Launonen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    TestRail: Runs

                      TestRail: Cases