X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/7f83b348ccf4cd815e9758ab9ca1012e66324e9d..92583637b25b6bde926f9ca6be7b085e5ac8b1e6:/src/src/string.c diff --git a/src/src/string.c b/src/src/string.c index 53ff0a834..afdb517a2 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -575,7 +575,7 @@ uschar * string_copy_dnsdomain(uschar *s) { uschar *yield; -uschar *ss = yield = store_get(Ustrlen(s) + 1, is_tainted(s)); +uschar *ss = yield = store_get(Ustrlen(s) + 1, TRUE); /* always treat as tainted */ while (*s != 0) { @@ -858,6 +858,9 @@ Arguments: separator a pointer to the separator character in an int (see above) buffer where to put a copy of the next string in the list; or NULL if the next string is returned in new memory + Note that if the list is tainted then a provided buffer must be + also (else we trap, with a message referencing the callsite). + If we do the allocation, taint is handled there. buflen when buffer is not NULL, the size of buffer; otherwise ignored Returns: pointer to buffer, containing the next substring, @@ -1689,6 +1692,7 @@ int main(void) uschar buffer[256]; printf("Testing is_ip_address\n"); +store_init(); while (fgets(CS buffer, sizeof(buffer), stdin) != NULL) {