diff options
author | Tilman Sauerbeck <tilman@code-monkey.de> | 2007-09-23 17:50:41 +0200 |
---|---|---|
committer | Tilman Sauerbeck <tilman@code-monkey.de> | 2007-09-23 17:50:41 +0200 |
commit | e8ffa513a109209849b11a3c608356cc28314a8e (patch) | |
tree | ac839784af6e8d8e86777ec4f30b338aa5f96384 /xkbparse.y | |
parent | dfa65b0c8df6a6aab4f86c32a0acb41f44201e7c (diff) |
Fixed an invalid memory access.
Some keynames are less than 3 characters long (not counting the
terminator). We're now also initializing all of the keyName array.
Diffstat (limited to 'xkbparse.y')
-rw-r--r-- | xkbparse.y | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -705,7 +705,8 @@ Terminal : String { ExprDef *expr; expr= ExprCreate(ExprValue,TypeKeyName); - memcpy(expr->value.keyName,$1,4); + memset(expr->value.keyName,0,5); + strncpy(expr->value.keyName,$1,4); free($1); $$= expr; } |