Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* resolv/gethnamaddr.c: Account bytes needed for alignment in
	buflen.  Patch by Olaf Kibrch <okir@lst.de>.
  • Loading branch information
Ulrich Drepper committed Oct 25, 1999
1 parent 654de60 commit 31a13ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
1999-10-25 Ulrich Drepper <drepper@cygnus.com>

* resolv/gethnamaddr.c: Account bytes needed for alignment in
buflen. Patch by Olaf Kibrch <okir@lst.de>.

* md5-crypt/md5test.c: Correct names of MD5 functions after
removing of public names.

Expand Down
4 changes: 4 additions & 0 deletions resolv/gethnamaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 31a13ab

Please sign in to comment.