X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/384152a6b0cce686255894a502e4b88743abd356..9ee44efbe7474892e931cd517195cb690e765ab6:/src/src/regex.c diff --git a/src/src/regex.c b/src/src/regex.c index c811f439f..de8ec685f 100644 --- a/src/src/regex.c +++ b/src/src/regex.c @@ -1,5 +1,3 @@ -/* $Cambridge: exim/src/src/regex.c,v 1.5 2005/05/24 08:15:02 tom Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ @@ -47,7 +45,7 @@ int regex(uschar **listptr) { if (mime_stream == NULL) { /* We are in the DATA ACL */ - mbox_file = spool_mbox(&mbox_size); + mbox_file = spool_mbox(&mbox_size, NULL); if (mbox_file == NULL) { /* error while spooling */ log_write(0, LOG_MAIN|LOG_PANIC, @@ -117,7 +115,7 @@ int regex(uschar **listptr) { Ustrncpy(regex_match_string_buffer, re_list_item->pcre_text, 1023); regex_match_string = regex_match_string_buffer; if (mime_stream == NULL) - fclose(mbox_file); + (void)fclose(mbox_file); else { clearerr(mime_stream); fseek(mime_stream,f_pos,SEEK_SET); @@ -129,7 +127,7 @@ int regex(uschar **listptr) { }; if (mime_stream == NULL) - fclose(mbox_file); + (void)fclose(mbox_file); else { clearerr(mime_stream); fseek(mime_stream,f_pos,SEEK_SET); @@ -210,7 +208,7 @@ int mime_regex(uschar **listptr) { /* open file */ - f = fopen(CS mime_decoded_filename, "r"); + f = fopen(CS mime_decoded_filename, "rb"); if (f == NULL) { /* open failed */ log_write(0, LOG_MAIN, @@ -232,13 +230,13 @@ int mime_regex(uschar **listptr) { mime_subject_len, 0, 0, NULL, 0) >= 0) { Ustrncpy(regex_match_string_buffer, re_list_item->pcre_text, 1023); regex_match_string = regex_match_string_buffer; - fclose(f); + (void)fclose(f); return OK; }; re_list_item = re_list_item->next; } while (re_list_item != NULL); - fclose(f); + (void)fclose(f); /* no matches ... */ return FAIL;