Instead, we exit with an error message.

This fixes Debian bug #716472 [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716472
---
 wmppp.app/wmppp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/wmppp.app/wmppp.c b/wmppp.app/wmppp.c
index 43fb696..7758eee 100644
--- a/wmppp.app/wmppp.c
+++ b/wmppp.app/wmppp.c
@@ -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);
-- 
2.1.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to