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

Review toupper use [qtvirtualkeyboard]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.6, 6.4.1, 6.5.0 FF
    • Virtual Keyboard
    • None
    • Linux/X11

    Description

      This is a spin off from QTBUG-109235, please see there for more info.

      I have a hard time deciding whether the tolower() call here:

      qtvirtualkeyboard/tests/manual/x11vkbwrapper/handlekeyevents.cpp:    KeySym keyS = upper ? keySym : static_cast<unsigned long>(tolower(static_cast<int>(keySym)));
      

      is genuinely supposed to map I to ı (LATIN SMALL LETTER DOTLESS I) in the Türkiye locale, or whether it shouldn't still be i. If it is, then the code is wrong, because tolower('I') will likely return I, then, since ı isn't representable. So the code is wrong, either way. The question is what the fix should be.

      The code also seems to run into UB, by passing KeySym values unchecked into tolower, which is defined only for [0..255] uchar values, and EOF.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes