diff options
author | Philippe Brochard <hocwp@free.fr> | 2010-12-05 18:08:56 +0100 |
---|---|---|
committer | Philippe Brochard <hocwp@free.fr> | 2010-12-05 18:08:56 +0100 |
commit | e3cacfb54cd2990026e718659dcbad5525782d51 (patch) | |
tree | fdfb0137b322b84fc3a3bb57ddb4be18547156c7 /xbindkeys.c | |
parent | 568fc5169cbd0dfefe987a382eab599fe6c6de6f (diff) | |
download | xbindkeys-e3cacfb54cd2990026e718659dcbad5525782d51.tar.gz |
Fix memory error: use sizeof(char)
Diffstat (limited to 'xbindkeys.c')
-rw-r--r-- | xbindkeys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbindkeys.c b/xbindkeys.c index 07e2266..f782c34 100644 --- a/xbindkeys.c +++ b/xbindkeys.c @@ -201,7 +201,7 @@ static void adjust_display (XAnyEvent * xany) { size_t envstr_size = strlen(DisplayString(xany->display)) + 8 + 1; - char* envstr = malloc ( envstr_size * sizeof (char) ); + char* envstr = malloc ( (envstr_size + 2) * sizeof (char) ); XWindowAttributes attr; char* ptr; char buf[16]; |