X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fspool_mbox.c;h=edc28034c89d5b687fa95161f01a3adc81e8e12f;hb=7c9f0469cb39055fff4096d1cb17ed72429c6b6c;hp=bdeb2b1a66fea44eb5626cadf42b84796b00611d;hpb=3ecab1575ef1f45a5e7cd3c48cd937ffa8eb0ad9;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/spool_mbox.c b/src/src/spool_mbox.c index bdeb2b1a6..edc28034c 100644 --- a/src/src/spool_mbox.c +++ b/src/src/spool_mbox.c @@ -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 */ -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; @@ -96,7 +98,11 @@ FILE *spool_mbox(unsigned long *mbox_file_size, uschar *source_file_override) { }; /* 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) {