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
    • 99dd2bb81 (dev), 897567c4e (dev), 5fca6c51c (dev), a9f252cc4 (dev), 6fa8db333 (dev), 98c7e69bc (6.10), 821270975 (6.10)
    • 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

          For Gerrit Dashboard: QTBUG-138520
          # Subject Branch Project Status CR V

          Activity