Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_keyboard.c:
- TRACE("xkb_layout=%s xkb_group=%u lang=%04x\n", xkb_layout, xkb_group, lang);
- LIST_FOR_EACH_ENTRY(layout, &xkb_layouts, struct layout, entry)
if (layout->lang == lang) index++;
- len = strlen(xkb_layout) + 1;
- if (!(layout = calloc(1, sizeof(*layout) + len)))
- {
ERR("Failed to allocate memory for Xkb layout entry\n");
return;
- }
- ptr = (char *)(layout + 1);
- layout->xkb_layout = strcpy(ptr, xkb_layout);
- ptr += len;
Nit: I guess this is only needed in upcoming commits?