summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2016-03-09 11:51:31 +0100
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2016-03-09 11:51:31 +0100
commitfae3a611be53dbf58cbb7c2c4846081ecb87606e (patch)
tree8e89a329327a48a922b1a4aad8d297e8e1317fed
parent3615fa9a06356891367c66ed284cef9db5cefca3 (diff)
downloadexim4-fae3a611be53dbf58cbb7c2c4846081ecb87606e.tar.gz
Test the return of getcwd()
-rw-r--r--src/src/exim.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index 574e7804b..3b6a9ba69 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -3748,7 +3748,11 @@ directory to "/"! Later we change to $spool_directory. We do it there, because
during readconf_main() some expansion takes place already. */
/* Store the initial cwd before we change directories */
-initial_cwd = getcwd(NULL, 0);
+if ((initial_cwd = getcwd(NULL, 0)) == NULL)
+ {
+ perror("exim: can't get the current working directory");
+ exit(EXIT_FAILURE);
+ }
readconf_main();