[Pkg-wmaker-commits] [wmppp.app] 84/120: wmppp.app: Fix segfault when HOME undefined.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 27 12:04:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmppp.app.
commit b57b499e635841e45154154c5787baf786dee512
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Tue May 19 22:31:06 2015 -0500
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
---
wmppp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/wmppp.c b/wmppp.c
index 43fb696..7758eee 100644
--- a/wmppp.c
+++ b/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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmppp.app.git
More information about the Pkg-wmaker-commits
mailing list