diff options
Diffstat (limited to 'lib/dns/rdata.c')
-rw-r--r-- | lib/dns/rdata.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index 08bfa34aa678d..9e1eebe70d29f 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -1168,12 +1168,12 @@ txt_totext(isc_region_t *source, isc_boolean_t quote, isc_buffer_t *target) { continue; } /* - * Escape double quote, semi-colon, backslash. - * If we are not enclosing the string in double - * quotes also escape at sign. + * Escape double quote and backslash. If we are not + * enclosing the string in double quotes also escape + * at sign and semicolon. */ - if (*sp == 0x22 || *sp == 0x3b || *sp == 0x5c || - (!quote && *sp == 0x40)) { + if (*sp == 0x22 || *sp == 0x5c || + (!quote && (*sp == 0x40 || *sp == 0x3b))) { if (tl < 2) return (ISC_R_NOSPACE); *tp++ = '\\'; |