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

QBuffer silent data corruption on seek() past INT_MAX (32-bit only)

    XMLWordPrintable

Details

    • All
    • 5
    • 4bc85b9850 (qt/qtbase/dev) 4bc85b9850 (qt/tqtc-qtbase/dev) ceb236954a (qt/qtbase/6.2) 2a6bd54cfa (qt/qtbase/6.3) ceb236954a (qt/tqtc-qtbase/6.2) 2a6bd54cfa (qt/tqtc-qtbase/6.3) da52a120dc (qt/tqtc-qtbase/5.15)
    • Team B Foundation Sprint 55

    Description

      When {{seek()}}ing a QBuffer to more than INT_MAX, the seek() call duly fails, but will have changed the underlying QByteArray:

      QBuffer buffer;
      buffer.open(QIODevice::WriteOnly);
      assert(buffer.buffer().size() == 0);
      assert(!buffer.seek(qint64(INT_MAX) + 1)); // SUCCEEDS
      assert(buffer.buffer().size() == 0); // FAILS
      

      Attachments

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

        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:
              Resolved: