X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/10554ed5982b03b2a486c0f09d479f8806f04c6a..8af5175d702f5d198d731adf760edf3bdcb60817:/src/parse.c diff --git a/src/parse.c b/src/parse.c index 9a4e0c7..59fe7b5 100644 --- a/src/parse.c +++ b/src/parse.c @@ -35,13 +35,12 @@ int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len) { qbuf[0]= 0; for (i=0; i= 127) { + if (ch <= ' ' || ch >= 127) { sprintf(qbuf,"\\%03o",ch); break; + } else if (!ctype_domainunquoted(ch)) { + sprintf(qbuf,"\\%c",ch); + break; } } if (!adns__vbuf_append(vb,buf,i) || !adns__vbuf_append(vb,qbuf,strlen(qbuf)))