]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r316179,r316180,r316181,r316260:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 29 May 2017 06:25:59 +0000 (06:25 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 29 May 2017 06:25:59 +0000 (06:25 +0000)
commit46c226319212d0ba91fd84b770fe42f956203f2a
treeb5fde9451cbf45fe6531fd255e159f017f6019b6
parent1f238213f0046ba9aeb702dff1628cc815c16a14
MFC r316179,r316180,r316181,r316260:

r316179 (by cem):

t_msgsnd: Use msgsnd()'s msgsz argument correctly to avoid overflow

msgsnd's msgsz argument is the size of the message following the 'long'
message type.  Don't include the message type in the size of the message
when invoking msgsnd(2).

CID: 1368712

r316180 (by cem):

Follow-up to r316179: More of the same

CIDs: 1368705136870613687071368710

r316181 (by cem):

t_msgctl: Fix the same msgsnd() misuse as t_msgsnd

msgsnd(2)'s msgsz argument does not describe the full structure, only the
message component.

CIDs: 13687031368711

r316260:

Annotate all changes made in r316178-r316180 with __FreeBSD__

Restore the stock (upstream) code under an #else block, so it's easier
for me to visualize and understand the code that needs to be upstreamed.

git-svn-id: svn://svn.freebsd.org/base/stable/10@319094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/netbsd-tests/lib/libc/sys/t_msgctl.c
contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c