Skip to content

Escape non-printable characters correctly

Peter Hutterer requested to merge whot/libxkbfile:wip/xkbcomp-segfault into master

This is the equivalent patch to xserver commit eaf1f72ed8994b708d94ec2de7b1a99f5c4a39b8:

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.

Fixes #8 (closed)

Merge request reports

Loading