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

Buffer for Dynamic Text was allocated too late

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • QSR 2.0
    • QSR 1.2, QSR 2.0 Alpha 1
    • Runtime
    • None
    • 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.

      Attachments

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

        Activity

          People

            jani.launonen Jani Launonen (Inactive)
            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