diff options
author | Philippe Brochard <hocwp@free.fr> | 2010-12-05 18:05:39 +0100 |
---|---|---|
committer | Philippe Brochard <hocwp@free.fr> | 2010-12-05 18:05:39 +0100 |
commit | 568fc5169cbd0dfefe987a382eab599fe6c6de6f (patch) | |
tree | 1a92afe94c672d14ed0e43c890afb0565b4ad59e | |
parent | adee1fd07c78b3b2a170a4140f03527e4a9b7a4b (diff) | |
download | xbindkeys-568fc5169cbd0dfefe987a382eab599fe6c6de6f.tar.gz |
Fix memory error: use sizeof(char)
-rw-r--r-- | xbindkeys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbindkeys.c b/xbindkeys.c index 074ed26..07e2266 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+2); + char* envstr = malloc ( envstr_size * sizeof (char) ); XWindowAttributes attr; char* ptr; char buf[16]; |