Skip to content

xkb: Handle invalid behavior->type in XkbBehaviorText().

Adam Richter requested to merge (removed):master into master

[Peter, thank you for processing my merge request so quickly yesterday! --Adam]

Cppcheck noticed that, in xkb/xkbtext.c, XkbBehaviorText(), if called with format != XKbCFile and behavior->type containing an unexpected value, could cause a memory fault on strlen(buf), because the local variable buf[] would not be initialized. So, add an error branch to handle it, although I do not believe the X server currently ever calls the function with such a combination of values.

Merge request reports