diff options
author | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-03-09 11:51:31 +0100 |
---|---|---|
committer | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-03-09 11:51:31 +0100 |
commit | fae3a611be53dbf58cbb7c2c4846081ecb87606e (patch) | |
tree | 8e89a329327a48a922b1a4aad8d297e8e1317fed /src | |
parent | 3615fa9a06356891367c66ed284cef9db5cefca3 (diff) |
Test the return of getcwd()
Diffstat (limited to 'src')
-rw-r--r-- | src/src/exim.c | 6 |
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(); |