From 08050235ed4527eb829d889e6a00d21b11a2dbdc Mon Sep 17 00:00:00 2001 From: nohar Date: Thu, 2 Feb 2006 09:00:42 +0000 Subject: [PATCH] fixes SEGV if no HOME environment var --- src/bip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bip.c b/src/bip.c index aed0695..6591956 100644 --- a/src/bip.c +++ b/src/bip.c @@ -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");