wayland/textinput_v2: copy the data instead of assuming ownership

The life time of the wl_array is limited to the callback, afterwards it's
a dangling pointer

BUG: 481239
wilder/Plasma/6.2
Xaver Hugl 2 years ago committed by Vlad Zahorodnii
parent 5d787a4083
commit 3a8ae60f87
  1. 2
      src/wayland/inputmethod_v1.cpp

@ -110,7 +110,7 @@ public:
}
void zwp_input_method_context_v1_modifiers_map(Resource *, wl_array *map) override
{
const auto mods = QByteArray::fromRawData(static_cast<const char *>(map->data), map->size);
const auto mods = QByteArray(static_cast<const char *>(map->data), map->size);
Q_EMIT q->modifiersMap(mods);
}

Loading…
Cancel
Save