mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-12 20:05:48 +01:00
WINGs: Plug potential segfault
...following up on d65cb5a ("Preparing to do exactly as FIXME says").
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
committed by
Carlos R. Mafra
parent
94a0c7b42f
commit
752d084609
@@ -51,20 +51,20 @@ char *wusergnusteppath()
|
||||
char *gspath;
|
||||
int pathlen;
|
||||
|
||||
if (!path) {
|
||||
gspath = getenv("GNUSTEP_USER_ROOT");
|
||||
gspath = getenv("GNUSTEP_USER_ROOT");
|
||||
if (gspath) {
|
||||
gspath = wexpandpath(gspath);
|
||||
if (gspath) {
|
||||
gspath = wexpandpath(gspath);
|
||||
pathlen = strlen(gspath) + 4;
|
||||
path = wmalloc(pathlen);
|
||||
strcpy(path, gspath);
|
||||
wfree(gspath);
|
||||
} else {
|
||||
pathlen = strlen(wgethomedir()) + 10;
|
||||
path = wmalloc(pathlen);
|
||||
strcpy(path, wgethomedir());
|
||||
strcat(path, "/GNUstep");
|
||||
}
|
||||
} else {
|
||||
pathlen = strlen(wgethomedir()) + 10;
|
||||
path = wmalloc(pathlen);
|
||||
strcpy(path, wgethomedir());
|
||||
strcat(path, "/GNUstep");
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
Reference in New Issue
Block a user