git://git.exim.org
/
users
/
heiko
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60236d8
)
Expansions: Reduce memory use of ${listcount }
author
Jeremy Harris
<jgh146exb@wizmail.org>
Thu, 24 Dec 2020 21:05:40 +0000
(21:05 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Thu, 24 Dec 2020 21:05:40 +0000
(21:05 +0000)
src/src/expand.c
patch
|
blob
|
history
diff --git
a/src/src/expand.c
b/src/src/expand.c
index 37276dd693ab41f1f3b371377617e467dbf80818..8be7bf97b074fd3b36eeb4ddf7dfaa6b77e65dbe 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-7324,10
+7324,10
@@
while (*s)
case EOP_LISTCOUNT:
{
- int cnt = 0;
-
int sep = 0
;
+ int cnt = 0
, sep = 0
;
+
uschar * buf = store_get(2, is_tainted(sub))
;
- while (string_nextinlist(CUSS &sub, &sep,
NULL, 0
)) cnt++;
+ while (string_nextinlist(CUSS &sub, &sep,
buf, 1
)) cnt++;
yield = string_fmt_append(yield, "%d", cnt);
continue;
}