xkb: Escape non-printable characters correctly

Graphics / X.Org / X.Org Server - Michal Srb [suse.com] - 4 October 2017 15:06 EDT

XkbStringText escapes non-printable characters using octal numbers. Such escape sequence would be at most 5 characters long ("\0123"), so it reserves 5 bytes in the buffer. Due to char->unsigned int conversion, it would print much longer string for negative numbers.

eaf1f72 xkb: Escape non-printable characters correctly.
xkb/xkbtext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share