mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-30 12:31:53 +08:00
(__cmsg_nxthdr): Fix test for no more entries.
This commit is contained in:
parent
2b5887d3e4
commit
37b1259bd5
@ -243,7 +243,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
|
||||
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
|
||||
+ __mhdr->msg_controllen)
|
||||
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
||||
>= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
/* No more entries. */
|
||||
return 0;
|
||||
return __cmsg;
|
||||
|
@ -267,7 +267,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
|
||||
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
|
||||
+ __mhdr->msg_controllen)
|
||||
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
||||
>= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
/* No more entries. */
|
||||
return 0;
|
||||
return __cmsg;
|
||||
|
Loading…
Reference in New Issue
Block a user