wmppp.app: Fix segfault when HOME undefined.
Instead, we exit with an error message. This fixes Debian bug #716472 [1]. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716472
This commit is contained in:
parent
7631c7d566
commit
37acf2a687
|
@ -422,6 +422,11 @@ void wmppp_routine(int argc, char **argv) {
|
|||
parse_rcfile(temp, wmppp_keys);
|
||||
|
||||
p = getenv("HOME");
|
||||
if (p == NULL) {
|
||||
fprintf(stderr,
|
||||
"error: HOME environment variable not defined\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
strcpy(temp, p);
|
||||
strcat(temp, "/.wmppprc");
|
||||
parse_rcfile(temp, wmppp_keys);
|
||||
|
|
Loading…
Reference in a new issue