summaryrefslogtreecommitdiff
path: root/xkbparse.y
diff options
context:
space:
mode:
Diffstat (limited to 'xkbparse.y')
-rw-r--r--xkbparse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/xkbparse.y b/xkbparse.y
index 662325b..f3eb7fe 100644
--- a/xkbparse.y
+++ b/xkbparse.y
@@ -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;
}