Commit f391df3
Properly set
Setting `(*pcmsghdr).cmsg_len = cmsg_len as _;` when cmsg_len ranges
from 0 to 64 is invalid as it must always be `>= size_of::<cmsghdr>()`,
rounded up to the nearest alignment boundary.
Some implementations (notably glbic) do check that `cmsg_len >=
size_of::<cmsghdr>()` in `CMSG_NXTHDR`, returning null if so. But
this is more so an extra precaution that is not mentioned in the POSIX
1003.1-2024. It can therefore not be relied on for tests executed on
multiple platforms.
The change also removes the ignoring of some testvalues when targeting AIX.cmsg_len in CMSG_NXTHDR tests.1 parent 1e43edb commit f391df3
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | | - | |
| 80 | + | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
| |||
0 commit comments