X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/79670d3c32ccb37fe06f25d8192943b58606a32a..2194d594e9f1f966cfa2e0e266d37216729b0fa1:/test/src/fakens.c diff --git a/test/src/fakens.c b/test/src/fakens.c index 0de4e60c2..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,12 +536,16 @@ 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; - /*XXX need a way of doing multi-chunk TXT RRs */ case ns_t_tlsa: pk = bytefield(&p, pk); /* usage */