X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/1d717e1c110562fd6bf28478c79f180cafeba776..114b01dded2c9d72cdd44cac97a4d3cc9f22ddfd:/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: