fixes SEGV if no HOME environment var
This commit is contained in:
parent
ebc7ec7f4e
commit
08050235ed
@ -677,8 +677,10 @@ int fireup(FILE *conf)
|
||||
|
||||
if (!conf_biphome) {
|
||||
char *home = getenv("HOME");
|
||||
if (!home)
|
||||
if (!home) {
|
||||
conf_die("no $HOME !, do you live in a trailer ?");
|
||||
return 0;
|
||||
}
|
||||
conf_biphome = malloc(strlen(home) + strlen("/.bip") + 1);
|
||||
strcpy(conf_biphome, home);
|
||||
strcat(conf_biphome, "/.bip");
|
||||
|
Loading…
Reference in New Issue
Block a user