mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 08:22:04 -04:00
1904. [bug] A escaped character is, potentially, converted to
the output character set too early. [RT #14666]
This commit is contained in:
parent
241c9fd306
commit
7755f5932a
3 changed files with 16 additions and 9 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
1904. [bug] A escaped character is, potentially, converted to
|
||||
the output character set too early. [RT #14666]
|
||||
|
||||
1903. [doc] Review ARM for BIND 9.4.
|
||||
|
||||
1902. [port] Use uintptr_t if available. [RT #14606]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: name.c,v 1.150 2005/04/27 04:56:48 sra Exp $ */
|
||||
/* $Id: name.c,v 1.151 2005/07/20 01:46:49 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -1371,13 +1371,14 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
trem--;
|
||||
nlen--;
|
||||
} else {
|
||||
char buf[5];
|
||||
if (trem < 4)
|
||||
return (ISC_R_NOSPACE);
|
||||
snprintf(buf, sizeof(buf),
|
||||
"\\%03u", c);
|
||||
memcpy(tdata, buf, 4);
|
||||
tdata += 4;
|
||||
*tdata++ = 0x5c;
|
||||
*tdata++ = 0x30 +
|
||||
((c / 100) % 10);
|
||||
*tdata++ = 0x30 +
|
||||
((c / 10) % 10);
|
||||
*tdata++ = 0x30 + (c % 10);
|
||||
trem -= 4;
|
||||
ndata++;
|
||||
nlen--;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.189 2005/05/19 04:59:03 marka Exp $ */
|
||||
/* $Id: rdata.c,v 1.190 2005/07/20 01:46:49 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -992,11 +992,14 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) {
|
|||
if (*sp < 0x20 || *sp >= 0x7f) {
|
||||
if (tl < 4)
|
||||
return (ISC_R_NOSPACE);
|
||||
snprintf(tp, 5, "\\%03u", *sp++);
|
||||
tp += 4;
|
||||
*tp++ = 0x5c;
|
||||
*tp++ = 0x30 + ((*sp / 100) % 10);
|
||||
*tp++ = 0x30 + ((*sp / 10) % 10);
|
||||
*tp++ = 0x30 + (*sp % 10);
|
||||
tl -= 4;
|
||||
continue;
|
||||
}
|
||||
/* double quote, semi-colon, backslash */
|
||||
if (*sp == 0x22 || *sp == 0x3b || *sp == 0x5c) {
|
||||
if (tl < 2)
|
||||
return (ISC_R_NOSPACE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue