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

qUncompress(qCompress()) round-trip fails for data > 2GiB

XMLWordPrintable

    • 3
    • 2fd990b386 (qt/qtbase/dev) 2fd990b386 (qt/tqtc-qtbase/dev) 93aa02e671 (qt/qtbase/6.4) 93aa02e671 (qt/tqtc-qtbase/6.4) 2a4d5b41cb (qt/tqtc-qtbase/6.2) 93aa02e671 (qt/tqtc-qtbase/6.4.1) 93aa02e671 (qt/tqtc-qtbase/tqtc/qtinsight-6.4)
    • Foundation Sprint 61, Foundation Sprint 62, Foundation Sprint 63, Foundation Sprint 64, Foundation Sprint 65, Foundation Sprint 66, Foundation Sprint 67, Foundation Sprint 68

      The code fails on 64-bit platforms:

      const QByteArray ba = ~~~ more than 4GiB of data ~~~;
      const QByteArray compressed = qCompress(ba);
      const QByteArray uncompressed = qUncompress(compressed);
      Q_COMPARE(ba, uncompressed);
      

      It seems to be caused by qCompress() using only four digits to encode the length.

      There doesn't appear to be something you can do, unless you change the format to include a longer length indicator.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes