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

Improper initialisation of m_detectedTargets hash in QtNfc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 5.11.0
    • Connectivity: NFC
    • None
    • Android version 5.0.2 phone htc one m7

    Description

      In the function onTargetDiscovered in the file Qt/5.11.0/Src/qtconnectivity/src/nfc/qnearfieldmanager_android.cpp the line

      NearFieldTarget *&target = m_detectedTargets[uid];

      inserts into the QHash m_detectedTargets a key of uid and an unknown value which assigns target an unknown value. This is because the m_detectedTargets QHash is not initialised with a value for uid. The m_detectedTargets is not initialised anywhere in the source as verified by a search through the complete Qt source code. This can cause a crash which does on my phone.

      Attachments

        Activity

          People

            ablasche Alex Blasche
            locutus Shane Shields
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: