keyboard: Fix insert_text() string utility
keyboard: Fix insert_text() string utility

strncat() into a newly allocated buffer isn't well-defined.  I don't know
how this didn't crash all the time, getting blocks from malloc() with
a NUL in the first byte must be fairly common.

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=71750

xorgy/weston,udoprog/weston,kwm81/weston,kwm81/weston,sir-murray/weston,giucam/weston,Fantu/compositor-spice,sir-murray/weston,eyolfson/weston,udoprog/weston,Tarnyko/weston-xdg_surface_present,Gnurou/weston,krezovic/weston,Fantu/compositor-spice,Fantu/compositor-spice,mchalupa/weston,krezovic/weston,xorgy/weston,Tarnyko/weston-xdg_surface_present,Gnurou/weston,giucam/weston,jonnylamb/weston,jonnylamb/weston,mchalupa/weston,eyolfson/weston