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

QWindowsKeyMapper::updatePossibleKeyCodes crashes when keycode is extended code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.2.0
    • None

    Description

      Not sure if this is fixed. Just ran across it today. Note: There should be a Platforms component for reporting purposes. This would fall under "Platforms:Windows".

      ---------------------------------------------------------------

      In QWindowsKeyMapper::updatePossibleKeyCodes, an array of virtual keys is used with bounds of 256. The passed in virtual key is used as an index into this array. However, if you generate an extended key, by pressing Alt and numeric keyboard, the resulting virtual key is too large. In my case 9830 which is way over the array boundaries.

      Offending Code:
      // Fills keyLayout for that vk_key. Values are all characters one can type using that key
      // (in connection with every combination of modifiers) and whether these "characters" are
      // dead keys.
      void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32 scancode,
      quint32 vk_key)
      {
      -> if (!vk_key || (keyLayout[vk_key].exists && !keyLayout[vk_key].dirty))
      return;

      Attachments

        Issue Links

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

          Activity

            People

              owolff Oliver Wolff
              hawkeye64 Jeff Galbraith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes