X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/8ea4d064a06f04658903b708c11c528c7349afc7..9bf74b9c298f6968417fe88a68ccdf2179db1403:/test/src/fakens.c diff --git a/test/src/fakens.c b/test/src/fakens.c index 2c82c5a82..3d6f513fc 100644 --- a/test/src/fakens.c +++ b/test/src/fakens.c @@ -329,7 +329,7 @@ int domainlen = Ustrlen(domain); BOOL pass_on_not_found = FALSE; tlist *typeptr; uschar *pk = *pkptr; -uschar buffer[256]; +uschar buffer[512]; uschar rrdomain[256]; uschar RRdomain[256]; @@ -536,10 +536,15 @@ while (fgets(CS buffer, sizeof(buffer), f) != NULL) break; case ns_t_txt: - pp = pk++; - if (*p == '"') p++; /* Should always be the case */ - while (*p != 0 && *p != '"') *pk++ = *p++; - *pp = pk - pp - 1; + while (*p) + { + pp = pk++; /* Skip the size byte in output */ + if (*p == '"') p++; /* Should always be the case */ + while (*p && *p != '"') *pk++ = *p++; + *pp = pk - pp - 1; /* fill in the size */ + p++; /* skip the closing doublequote */ + while (isspace(*p)) p++; /* next chunk start */ + } break; case ns_t_tlsa: