1
0
forked from bip/bip

fixes SEGV if no HOME environment var

This commit is contained in:
nohar 2006-02-02 09:00:42 +00:00
parent ebc7ec7f4e
commit 08050235ed

View File

@ -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");