projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2c42ed
)
fix regression in dn_expand/reverse dns
author
Rich Felker
<dalias@aerifal.cx>
Sat, 24 Aug 2013 01:25:01 +0000
(21:25 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 24 Aug 2013 01:25:01 +0000
(21:25 -0400)
off-by-one error copying the name components was yielding junk at the
beginning and truncating one character at the end (of every
component).
src/network/dn_expand.c
patch
|
blob
|
history
diff --git
a/src/network/dn_expand.c
b/src/network/dn_expand.c
index f817d059ae9c43bdaecb7fdddbbedd740af613b3..4e02e3d27382b449185da382b8bb0be6e112d2ad 100644
(file)
--- a/
src/network/dn_expand.c
+++ b/
src/network/dn_expand.c
@@
-17,7
+17,7
@@
int __dn_expand(const unsigned char *base, const unsigned char *end, const unsig
} else if (*p) {
j = *p+1;
if (j>=end-p || j>space) return -1;
- while (--j) *dest++ = *
p++
;
+ while (--j) *dest++ = *
++p
;
*dest++ = *++p ? '.' : 0;
} else {
if (len < 0) len = p+1-src;