mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-01 23:35:45 -04:00
1842. [port] cmsg_len() could produce incorrect results on
some platform. [RT #13744]
This commit is contained in:
parent
852e0edf29
commit
1100decf3f
2 changed files with 9 additions and 2 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
1842. [port] cmsg_len() could produce incorrect results on
|
||||
some platform. [RT #13744]
|
||||
|
||||
1840. [func] dnssec-signzone can now randomize signature end times
|
||||
(dnssec-signzone -j jitter). [RT #13609]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: socket.c,v 1.237.18.10 2005/03/16 23:51:28 marka Exp $ */
|
||||
/* $Id: socket.c,v 1.237.18.11 2005/03/30 05:42:53 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -465,7 +465,11 @@ cmsg_len(ISC_SOCKADDR_LEN_T len) {
|
|||
#else
|
||||
ISC_SOCKADDR_LEN_T hdrlen;
|
||||
|
||||
hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(NULL); /* XXX */
|
||||
/*
|
||||
* Cast NULL so that any pointer arithmetic performed by CMSG_DATA
|
||||
* is correct.
|
||||
*/
|
||||
hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(((struct cmsghdr *)NULL));
|
||||
return (hdrlen + len);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue