mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
68507377f2
The inline and library functions that the CMSG_NXTHDR macro may expand
to increment the pointer to the header before checking the stride of
the increment against available space. Since C only allows incrementing
pointers to one past the end of an array, the increment must be done
after a length check. This commit fixes that and includes a regression
test for CMSG_FIRSTHDR and CMSG_NXTHDR.
The Linux, Hurd, and generic headers are all changed.
Tested on Linux on armv7hl, i686, x86_64, aarch64, ppc64le, and s390x.
[BZ #28846]
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit
|
||
---|---|---|
.. | ||
bits | ||
sys | ||
accept4.c | ||
accept.c | ||
bind.c | ||
connect.c | ||
getpeername.c | ||
getsockname.c | ||
getsockopt.c | ||
isfdtype.c | ||
listen.c | ||
Makefile | ||
opensock.c | ||
recv.c | ||
recvfrom.c | ||
recvmmsg.c | ||
recvmsg.c | ||
sa_len.c | ||
send.c | ||
sendmmsg.c | ||
sendmsg.c | ||
sendto.c | ||
setsockopt.c | ||
shutdown.c | ||
sockaddr_un_set.c | ||
sockatmark.c | ||
socket.c | ||
socketpair.c | ||
tst-accept4.c | ||
tst-cmsghdr-skeleton.c | ||
tst-cmsghdr.c | ||
tst-sockaddr_un_set.c | ||
tst-sockopt-time64.c | ||
tst-sockopt.c | ||
Versions |