Allocate enough space for the 0-terminator.
This resulted in kcompmgr sometimes not being able to read the config file. Bug found and fixed by Dennis Kasprzyk <cyber.labs@gmx.de> svn path=/trunk/kdebase/kwin/; revision=384644
This commit is contained in:
parent
552589b141
commit
e3d4b11e14
1 changed files with 1 additions and 1 deletions
|
@ -2146,7 +2146,7 @@ loadConfig(char *filename){
|
|||
wasNull = True;
|
||||
const char *home = getenv("HOME");
|
||||
const char *configfile = "/.xcompmgrrc";
|
||||
filename = (char*)malloc((strlen(home)+strlen(configfile))*sizeof(char));
|
||||
filename = (char*)malloc((strlen(home)+strlen(configfile)+1)*sizeof(char));
|
||||
|
||||
strcat(filename, home);
|
||||
strcat(filename, configfile);
|
||||
|
|
Loading…
Reference in a new issue