A safer version of the check for gecos expansion.
[exim.git] / src / src / regex.c
index 7383f3c465d31bfd5ea8c7605b64fe59636bd435..de8ec685fc15a1114ae5de001a9f1c43b10a03c4 100644 (file)
@@ -1,5 +1,3 @@
-/* $Cambridge: exim/src/src/regex.c,v 1.6 2005/06/27 14:29:43 ph10 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,
@@ -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,