git://git.exim.org
/
users
/
jgh
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test the return of getcwd()
[users/jgh/exim.git]
/
src
/
src
/
exim.c
diff --git
a/src/src/exim.c
b/src/src/exim.c
index 574e7804ba37adb9564bd99f1e045d82c3716410..3b6a9ba69ec4628d1a25be78e9f6baf2e027c85a 100644
(file)
--- 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 */
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();
readconf_main();