X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/80fea873648ca2ab2e592999a336c59cf054ab55..3124effbfe192d3a9f1ee5e887402343cc2dd3de:/src/src/regex.c diff --git a/src/src/regex.c b/src/src/regex.c index 233a56bce..66372960f 100644 --- a/src/src/regex.c +++ b/src/src/regex.c @@ -4,7 +4,7 @@ /* Copyright (c) Tom Kistner 2003-2015 * License: GPL - * Copyright (c) The Exim Maintainers 2016 + * Copyright (c) The Exim Maintainers 2016 - 2018 */ /* Code for matching regular expressions against headers and body. @@ -105,7 +105,7 @@ regex_match_string = NULL; if (!mime_stream) /* We are in the DATA ACL */ { - if (!(mbox_file = spool_mbox(&mbox_size, NULL))) + if (!(mbox_file = spool_mbox(&mbox_size, NULL, NULL))) { /* error while spooling */ log_write(0, LOG_MAIN|LOG_PANIC, "regex acl condition: error while creating mbox spool file"); @@ -148,7 +148,12 @@ if (!mime_stream) else { clearerr(mime_stream); - fseek(mime_stream, f_pos, SEEK_SET); + if (fseek(mime_stream, f_pos, SEEK_SET) == -1) + { + log_write(0, LOG_MAIN|LOG_PANIC, + "regex acl condition: mime_stream: %s", strerror(errno)); + clearerr(mime_stream); + } } return ret;