diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-11-15 09:44:33 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-11-15 09:44:33 +0000 |
commit | eba0c039a556478f50aa1e4839684027746197f7 (patch) | |
tree | 3350ce31f59b832321115ea2fef171a588bc56bb /src | |
parent | c9e118da29e724cdc79c84a6d237d0a13d0337a9 (diff) |
Discard the values of the numeric variables after a wildlsearch lookup.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/lookups/lsearch.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/src/lookups/lsearch.c b/src/src/lookups/lsearch.c index c5e75dfdd..1acfd7494 100644 --- a/src/src/lookups/lsearch.c +++ b/src/src/lookups/lsearch.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/lookups/lsearch.c,v 1.4 2005/06/27 14:29:44 ph10 Exp $ */ +/* $Cambridge: exim/src/src/lookups/lsearch.c,v 1.5 2005/11/15 09:44:33 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -197,7 +197,16 @@ for (last_was_eol = TRUE; if (rc == FAIL) continue; if (rc == DEFER) return DEFER; } - break; /* Key matched */ + + /* The key has matched. If the search involved a regular expression, it + might have caused numerical variables to be set. However, their values will + be in the wrong storage pool for external use. Copying them to the standard + pool is not feasible because of the caching of lookup results - a repeated + lookup will not match the regular expression again. Therefore, we flatten + all numeric variables at this point. */ + + expand_nmax = -1; + break; /* Compare an ip address against a list of network/ip addresses. We have to allow for the "*" case specially. */ |