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

QSafeString::set needs nullptr check

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • QSR 3.0
    • QSR 3.0
    • Runtime
    • None
    • 8f03668ed (dev)

    Description

      void QSafeString::set(const qchar * const strArg, const size_t lengthArg) function requires nullptr check for the strArg. Currently std::copy will be called for strArg without nullptr check and that can lead to unexpected behavior.

      Also, lengthArg should be checked for zero, and do just a reset to the m_data instead of set if the length is 0.

      Attachments

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

        Activity

          People

            jussi_witick Jussi Witick
            jussi_witick Jussi Witick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes