]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
also escape the backslash
authorMatthijs Mekking <matje@NLnetLabs.nl>
Tue, 15 Dec 2009 08:34:42 +0000 (08:34 +0000)
committerMatthijs Mekking <matje@NLnetLabs.nl>
Tue, 15 Dec 2009 08:34:42 +0000 (08:34 +0000)
host2str.c

index 9e5389bb38193c8f46a2858c3502e574fdb61b88..7ef5e391188e28d6935e2dfb5fe6461ed405eec5 100644 (file)
@@ -355,7 +355,7 @@ ldns_rdf2buffer_str_str(ldns_buffer *output, const ldns_rdf *rdf)
        for (i = 1; i <= length; ++i) {
                char ch = (char) data[i];
                if (isprint((int)ch) || ch=='\t') {
-                       if (ch=='\"')
+                       if (ch=='\"'||ch=='\\')
                                ldns_buffer_printf(output, "\\%c", ch);
                        else
                                ldns_buffer_printf(output, "%c", ch);