Skip to content

Commit

Permalink
[BZ #6942]
Browse files Browse the repository at this point in the history
2008-10-07  Andreas Schwab  <schwab@suse.de>
	[BZ #6942]
	* resolv/res_send.c (send_vc): Fix last change.
	(send_dg): Align here as well.
  • Loading branch information
Ulrich Drepper committed Oct 31, 2008
1 parent 1828d6b commit ad12e63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2008-10-07 Andreas Schwab <schwab@suse.de>

[BZ #6942]
* resolv/res_send.c (send_vc): Fix last change.
(send_dg): Align here as well.

2008-10-31 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Handle UL_GETFSIZE
Expand Down
10 changes: 9 additions & 1 deletion resolv/res_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ send_vc(res_state statp,
#else
int aligned_resplen
= ((resplen + __alignof__ (HEADER) - 1)
& (__alignof__ (HEADER) - 1));
& ~(__alignof__ (HEADER) - 1));
*anssizp2 = orig_anssizp - aligned_resplen;
*ansp2 = *ansp + aligned_resplen;
#endif
Expand Down Expand Up @@ -1058,8 +1058,16 @@ send_dg(res_state statp,
/* No buffer allocated for the first
reply. We can try to use the rest
of the user-provided buffer. */
#ifdef _STRING_ARCH_unaligned
*anssizp2 = orig_anssizp - resplen;
*ansp2 = *ansp + resplen;
#else
int aligned_resplen
= ((resplen + __alignof__ (HEADER) - 1)
& ~(__alignof__ (HEADER) - 1));
*anssizp2 = orig_anssizp - aligned_resplen;
*ansp2 = *ansp + aligned_resplen;
#endif
} else {
/* The first reply did not fit into the
user-provided buffer. Maybe the second
Expand Down

0 comments on commit ad12e63

Please sign in to comment.