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

Uninitialized memory sent to X server in QXcbDrag::handleDrop

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.2
    • 5.14.0
    • QPA: X11/XCB
    • None
    • Linux/X11
    • 9459abbe957ec1d083cebf24e90ebd19a1726d09 (qt/qtbase/5.15)

    Description

      The memory sanitizer complained about uninitialized value being sent to X server - the source of the uninitialized data is the "xcb_client_message_event_t finished". We got our tests to pass, but it looks like there are other cases where uninitialized memory is being used.

      --- src/plugins/platforms/xcb/qxcbdrag.cpp    2020-09-01 10:10:51.369595517 -0700
      +++ src/plugins/platforms/xcb/qxcbdrag.cpp        2020-09-01 10:11:20.564197019 -0700
      @@ -1066,7 +1066,7 @@
       
           setExecutedDropAction(response.acceptedAction());
       
      -    xcb_client_message_event_t finished;
      +    xcb_client_message_event_t finished = {};
           finished.response_type = XCB_CLIENT_MESSAGE;
           finished.sequence = 0;
           finished.window = xdnd_dragsource;
      

       

      Attachments

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

        Activity

          People

            liaqi Liang Qi
            cwgthornton Chris Thornton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes