1904. [bug] A escaped character is, potentially, converted to
the output character set too early. [RT #14666]
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1904. [bug] A escaped character is, potentially, converted to
|
||||
the output character set too early. [RT #14666]
|
||||
|
||||
1902. [port] Use uintptr_t if available. [RT #14606]
|
||||
|
||||
1898. [port] sunos: non blocking i/o support. [RT #14951]
|
||||
|
||||
+7
-6
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: name.c,v 1.127.2.7.2.11 2004/09/01 05:19:59 marka Exp $ */
|
||||
/* $Id: name.c,v 1.127.2.7.2.12 2005/07/20 01:50:46 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1305,13 +1305,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--;
|
||||
|
||||
+6
-3
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.147.2.11.2.18 2005/03/20 22:34:00 marka Exp $ */
|
||||
/* $Id: rdata.c,v 1.147.2.11.2.19 2005/07/20 01:50:47 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h>
|
||||
@@ -986,11 +986,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);
|
||||
|
||||
Reference in New Issue
Block a user