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

QAuthenticator operator== crashes

    XMLWordPrintable

Details

    • b8b732b9c65c02ee542885e5d6fe9bd1589a6b1a

    Description

      This simple scenario leads to AV:

       QAuthenticator s1, s2;
       s1.setUser("User");
       if (s2 == s1) {}
      

      Reason is QAuthenticator::operator== implementation:

      bool QAuthenticator::operator==(const QAuthenticator &other) const
      {
          if (d == other.d)
              return true;
          return d->user == other.d->user
              && d->password == other.d->password
              && d->realm == other.d->realm
              && d->method == other.d->method
              && d->options == other.d->options;
      }
      

      In this scenario d is null.

      Attachments

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

        Activity

          People

            jefernan Jesus Fernandez
            greydemonstr Sergey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes