diff options
author | sabetts <sabetts> | 2002-08-31 16:41:35 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2002-08-31 16:41:35 +0000 |
commit | cb9b0e5ee455fd615338baf828fd3ea8a541b395 (patch) | |
tree | 7b3e147c1b8041e80a30e4b1e3c7fa5a77688874 /src/actions.c | |
parent | 7ba1b046c9cd461f96917746dd982c049c3afe92 (diff) | |
download | ratpoison-cb9b0e5ee455fd615338baf828fd3ea8a541b395.zip |
(cmd_bind): malloc the correct amount of memory for keydesc
(cmd_unbind): likewise
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 4 |
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); |