Commit Graph

6 Commits

Author SHA1 Message Date
javigafe ff02028ec9
Fix memory issues
Add some free's
2020-02-02 11:52:48 +01:00
codedokode b06aeb812d Fixed segfault because of out-of-bounds access to a vector, changed index operator to at() to prevent similar problems in future 2018-08-12 01:15:53 +03:00
selurvedu 7d5c44d4c4 Trim unwanted bracket in layout name 2015-07-27 21:11:13 +00:00
selurvedu 58fa6eb1f9 Support symbol strings with '_' in place of '+'
This fixes a segfault that occurs for the following reason:

 - In XKeyboard::initializeXkb(), the XkbSymbolParser::parse() is called
   with three arguments - string to process (symName),
   vector to push symbol names to (_symbolNames)
   and vector to push variant names to (_variantNames).

 - In XkbSymbolParser::parse(), it looks for char '+' in symName string,
   but Xkb may use '_' instead when creating that string. If the char
   is not found, parse() doesn't append anything to vectors and they
   remain empty.

 - Later, XKeyboard::initializeXkb() tries to access nonexistent data in
   _symbolNames, which causes a segmentation fault (on lines 162-163).
2015-07-20 01:05:59 +03:00
Kristian Setälä 2170545899 Added layout variant code to XKeyboard class 2010-01-02 23:01:53 +02:00
Kristian Setälä 430b9daac6 Original XKeyboard class 2010-01-02 23:01:20 +02:00