Closed
Description
cmsg(3) says:
CMSG_DATA()
returns a pointer to the data portion of a cmsghdr. The pointer returned cannot be assumed to be suitably aligned for accessing arbitrary
payload data types. Applications should not cast it to a pointer type matching the payload, but should instead use memcpy(3) to copy data
to or from a suitably declared object.
send_pid_on_socket() and read_pid_from_socket() in bubblewrap's utils.c both cast the return value exactly like the documentation says not to do.
(This should be a very easy newcomers issue.)
Metadata
Assignees
Labels
No labels
Activity