| 1 | Descriptionsscip-debian debian hnb 1.9.18+ds1-3 hnb/patches/`27_fix_segfault_on_unset_$HOME.patch`#Descriptions.: Fixes segfault if $HOME is not set |
| 2 | Authorscip-debian debian hnb 1.9.18+ds1-3 hnb/patches/`27_fix_segfault_on_unset_$HOME.patch`#Author.: Axel Beckert <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 3 | Debian-Bugscip-debian debian hnb 1.9.18+ds1-3 hnb/patches/`27_fix_segfault_on_unset_$HOME.patch`#Debian-Bug.: 716062 |
| 4 | |
| 5 | Index: hnb/src/prefs.cscip-debian debian hnb 1.9.18+ds1-3 hnb/upstream/`hnb/src/prefs.c`: |
| 6 | =================================================================== |
| 7 | --- hnb.orig/src/prefs.cscip-debian debian hnb 1.9.18+ds1-3 hnb/upstream/`hnb.orig/src/prefs.c`: 2013-07-13 14:52:05.255654877 +0200 |
| 8 | +++ hnb/src/prefs.c 2013-07-13 16:30:17.707087142 +0200 |
| 9 | @@ -54,6 +54,10 @@ |
| 10 | void init_prefs () |
| 11 | { |
| 12 | #ifndef WIN32 |
| 13 | + if (!getenv ("HOME")) { |
| 14 | + fprintf(stderr, "$HOME is not set. Exiting.\n"); |
| 15 | + exit(1); |
| 16 | + } |
| 17 | sprintf (prefs.rc_file, "%s/.hnbrc", getenv ("HOME")); |
| 18 | sprintf (prefs.default_db_file, "%s/.hnb", getenv ("HOME")); |
| 19 | #endif |