aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-25 22:22:33 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-25 22:22:33 +0000
commit31a13ab3f9acaccae1c4b0b3788a56b4b5f5e95b (patch)
tree008064aba22fbdef1d11cbb736cd97445d960343 /resolv
parent654de60c0091730037a70336d2632bababf5d730 (diff)
downloadglibc-31a13ab3f9acaccae1c4b0b3788a56b4b5f5e95b.tar
glibc-31a13ab3f9acaccae1c4b0b3788a56b4b5f5e95b.tar.gz
glibc-31a13ab3f9acaccae1c4b0b3788a56b4b5f5e95b.tar.bz2
glibc-31a13ab3f9acaccae1c4b0b3788a56b4b5f5e95b.zip
Update.
* resolv/gethnamaddr.c: Account bytes needed for alignment in buflen. Patch by Olaf Kibrch <okir@lst.de>.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/gethnamaddr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 4484b81ce7..7f1b742c4d 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -420,6 +420,10 @@ getanswer(answer, anslen, qname, qtype)
buflen -= nn;
}
+ /* XXX: when incrementing bp, we have to decrement
+ * buflen by the same amount --okir */
+ buflen -= sizeof(align) - ((u_long)bp % sizeof(align));
+
bp += sizeof(align) - ((u_long)bp % sizeof(align));
if (bp + n >= &hostbuf[sizeof hostbuf]) {