summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ndb/dn.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-11-03 20:38:23 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2021-11-03 20:38:23 +0000
commitc37de334631ca74fd7a8bccf67393b50463aaaf8 (patch)
treea76683853e00478f86cac3a56f4eb560c3221892 /sys/src/cmd/ndb/dn.c
parent6285c19b3325e77c9056c369de1d64dd5132cb56 (diff)
ndb/dns: use decimal encoding for txt rr string escapes
rfc883 suggests to use decimal digits to escape txt rr strings, and unix dig appears to use the same. so change from octal to decimal.
Diffstat (limited to 'sys/src/cmd/ndb/dn.c')
-rw-r--r--sys/src/cmd/ndb/dn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/ndb/dn.c b/sys/src/cmd/ndb/dn.c
index 377fdd987..2fbbb50c6 100644
--- a/sys/src/cmd/ndb/dn.c
+++ b/sys/src/cmd/ndb/dn.c
@@ -1201,7 +1201,7 @@ idnname(DN *dn, char *buf, int nbuf)
* control characters and double quotes (") which would
* collide with ndb(6) format.
* escape special characters by encoding them as: \DDD
- * where D is a octal digit. backslash (\) is escaped
+ * where D is a decimal digit. backslash (\) is escaped
* by doubling. valid utf8 is encoded verbatim.
*/
int
@@ -1227,7 +1227,7 @@ bslashfmt(Fmt *f)
}
c = *data;
if(c < ' ' || c == '"' || c > '~')
- out += fmtprint(f, "\\%.3o", c);
+ out += fmtprint(f, "\\%.3d", c);
else if(c == '\\')
out += fmtprint(f, "\\\\");
else