Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21528

Possible nullptr dereference in AndroidDeployQtStep

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 4.7.2
    • Android Support
    • None
    • Linux/X11

    Description

      I faced the nullptr de reference issue here:
      https://github.com/qt-creator/qt-creator/blob/61aa2d37417e42479eabbd38179f8792101b7578/src/plugins/android/androiddeployqtstep.cpp#L96

      source of nullptr is

      QtVersionManager::version()
      BaseQtVersion *QtVersionManager::version(int id)
      {
          QTC_ASSERT(isLoaded(), return nullptr);
          QMap<int, BaseQtVersion *>::const_iterator it = m_versions.constFind(id);
          if (it == m_versions.constEnd())
              return nullptr;
          return it.value();
      }
      

      The QtSupport::QtKitInformation::qtVersion calls the QtVersionManager::version - so it may return nullptr but code simply calls

      AndroidDeployQtStep::AndroidDeployQtStep()
      QtSupport::QtKitInformation::qtVersion(target()->kit())->qtVersion()
      

      so ->qtVersion() may be called on nullptr.
       
      Because of this I'm not able to work with Android project.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-21528
        # Subject Branch Project Status CR V

        Activity

          People

            portale Alessandro Portale
            travnick Mikołaj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes