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

Harden QTextStream's internal APIs

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Core: Serialization
    • None
    • 2
    • Foundation Sprint 134

    Description

      As a security-critical component, QTextStream should have internal APIs that are hard to abuse. But there are error-prone (ptr, size) functions, which should be using views instead. And there's, in particular, the putString() overload set, which is "dangerous", since it contains (ptr, size, bool=false) and (view, bool) overloads which are prone to incorrectly resolve some (p, n) overloads towards the latter instead of the former (e.g. if the ptr isn't QChar, but something accepted by the view).

      Acceptance criteria:

      • replace (ptr, n) functions with ones taking view
      • either replace the bool parameter by a tag struct, or split putString() into putString() and putNumber().

      Attachments

        Issue Links

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

          Activity

            People

              mmutz Marc Mutz
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes