summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-08-31 16:41:35 +0000
committersabetts <sabetts>2002-08-31 16:41:35 +0000
commitcb9b0e5ee455fd615338baf828fd3ea8a541b395 (patch)
tree7b3e147c1b8041e80a30e4b1e3c7fa5a77688874 /src
parent7ba1b046c9cd461f96917746dd982c049c3afe92 (diff)
downloadratpoison-cb9b0e5ee455fd615338baf828fd3ea8a541b395.zip
(cmd_bind): malloc the correct amount of memory for keydesc
(cmd_unbind): likewise
Diffstat (limited to 'src')
-rw-r--r--src/actions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c
index 875c235..4fcd0e4 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -452,7 +452,7 @@ cmd_bind (int interactive, void *data)
return NULL;
}
- keydesc = (char*) xmalloc (strlen (data + 1));
+ keydesc = (char*) xmalloc (strlen (data) + 1);
sscanf (data, "%s", keydesc);
cmd = data + strlen (keydesc);
@@ -506,7 +506,7 @@ cmd_unbind (int interactive, void *data)
return NULL;
}
- keydesc = (char*) xmalloc (strlen (data + 1));
+ keydesc = (char*) xmalloc (strlen (data) + 1);
sscanf (data, "%s", keydesc);
key = parse_keydesc (keydesc);