git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
max_parallel transport option
[exim.git]
/
src
/
src
/
spool_mbox.c
diff --git
a/src/src/spool_mbox.c
b/src/src/spool_mbox.c
index bdeb2b1a66fea44eb5626cadf42b84796b00611d..8d04f8e17ea5f77030255c320a4c88de7c1ee1ab 100644
(file)
--- a/
src/src/spool_mbox.c
+++ b/
src/src/spool_mbox.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) Tom Kistner <tom@duncanthrax.net> 2003
-????
*/
+/* Copyright (c) Tom Kistner <tom@duncanthrax.net> 2003
- 2015
*/
/* License: GPL */
/* Code for setting up a MBOX style spool file inside a /scan/<msgid>
/* License: GPL */
/* Code for setting up a MBOX style spool file inside a /scan/<msgid>
@@
-26,7
+26,9
@@
uschar spooled_message_id[17];
/* returns a pointer to the FILE, and puts the size in bytes into mbox_file_size
* normally, source_file_override is NULL */
/* returns a pointer to the FILE, and puts the size in bytes into mbox_file_size
* normally, source_file_override is NULL */
-FILE *spool_mbox(unsigned long *mbox_file_size, uschar *source_file_override) {
+FILE *
+spool_mbox(unsigned long *mbox_file_size, const uschar *source_file_override)
+{
uschar message_subdir[2];
uschar buffer[16384];
uschar *temp_string;
uschar message_subdir[2];
uschar buffer[16384];
uschar *temp_string;
@@
-96,7
+98,11
@@
FILE *spool_mbox(unsigned long *mbox_file_size, uschar *source_file_override) {
};
/* End headers */
};
/* End headers */
- (void)fwrite("\n", 1, 1, mbox_file);
+ if (fwrite("\n", 1, 1, mbox_file) != 1) {
+ log_write(0, LOG_MAIN|LOG_PANIC, "Error/short write while writing \
+ message headers to %s", mbox_path);
+ goto OUT;
+ }
/* copy body file */
if (source_file_override == NULL) {
/* copy body file */
if (source_file_override == NULL) {