Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_text_input.c:
{
- struct wayland_text_input *text_input = data;
- TRACE("data %p, text_input %p, text %s, cursor_begin %d.\n", data, zwp_text_input_v3,
debugstr_a(text), cursor_begin);
- pthread_mutex_lock(&text_input->mutex);
- text_input->preedit_string = malloc(strlen(text) + 1);
- if (!text_input->preedit_string)
- {
ERR("Failed to allocate memory for IME preedit string.\n");
pthread_mutex_unlock(&text_input->mutex);
return;
- }
- strcpy(text_input->preedit_string, text);
- text_input->cursor_begin = cursor_begin;
- pthread_mutex_unlock(&text_input->mutex);
```suggestion:-10+0 pthread_mutex_lock(&text_input->mutex); text_input->preedit_string = strdup(text); text_input->cursor_begin = cursor_begin; pthread_mutex_unlock(&text_input->mutex); ```