Descriptions: Fixes segfault if $HOME is not set Author: Axel Beckert Debian-Bug: 716062 Index: hnb/src/prefs.c =================================================================== --- hnb.orig/src/prefs.c 2013-07-13 14:52:05.255654877 +0200 +++ hnb/src/prefs.c 2013-07-13 16:30:17.707087142 +0200 @@ -54,6 +54,10 @@ void init_prefs () { #ifndef WIN32 + if (!getenv ("HOME")) { + fprintf(stderr, "$HOME is not set. Exiting.\n"); + exit(1); + } sprintf (prefs.rc_file, "%s/.hnbrc", getenv ("HOME")); sprintf (prefs.default_db_file, "%s/.hnb", getenv ("HOME")); #endif