From 31a13ab3f9acaccae1c4b0b3788a56b4b5f5e95b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 25 Oct 1999 22:22:33 +0000 Subject: Update. * resolv/gethnamaddr.c: Account bytes needed for alignment in buflen. Patch by Olaf Kibrch . --- ChangeLog | 3 +++ resolv/gethnamaddr.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index f7d9880b24..7b26924cff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-10-25 Ulrich Drepper + * resolv/gethnamaddr.c: Account bytes needed for alignment in + buflen. Patch by Olaf Kibrch . + * md5-crypt/md5test.c: Correct names of MD5 functions after removing of public names. 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]) { -- cgit v1.2.3-70-g09d2