X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fstring.c;h=afdb517a25e146bd4d64e114c3eb2117cb324ed9;hb=4a92bfe6da547eb599b76da068b8b908e1c509b7;hp=53ff0a8343bf240f2e19980994e02d02e26d5bb1;hpb=7f83b348ccf4cd815e9758ab9ca1012e66324e9d;p=user%2Fhenk%2Fcode%2Fexim.git 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) {