mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Internal change
PiperOrigin-RevId: 317068509 Change-Id: I268381ca50eabed88b189bf79ccc9313e5b7d9ae
This commit is contained in:
parent
89e80d4c80
commit
5de6b84111
|
@ -374,7 +374,7 @@ bool Comms::RecvFD(int* fd) {
|
||||||
// syscall(__NR_recvmsg) semantics so we need to suppress the error (here and
|
// syscall(__NR_recvmsg) semantics so we need to suppress the error (here and
|
||||||
// everywhere below).
|
// everywhere below).
|
||||||
#ifdef MEMORY_SANITIZER
|
#ifdef MEMORY_SANITIZER
|
||||||
ANNOTATE_MEMORY_IS_INITIALIZED(&tlv, sizeof(tlv));
|
ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(&tlv, sizeof(tlv));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tlv.tag != kTagFd) {
|
if (tlv.tag != kTagFd) {
|
||||||
|
@ -384,7 +384,7 @@ bool Comms::RecvFD(int* fd) {
|
||||||
|
|
||||||
cmsg = CMSG_FIRSTHDR(&msg);
|
cmsg = CMSG_FIRSTHDR(&msg);
|
||||||
#ifdef MEMORY_SANITIZER
|
#ifdef MEMORY_SANITIZER
|
||||||
ANNOTATE_MEMORY_IS_INITIALIZED(cmsg, sizeof(cmsghdr));
|
ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(cmsg, sizeof(cmsghdr));
|
||||||
#endif
|
#endif
|
||||||
while (cmsg) {
|
while (cmsg) {
|
||||||
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
|
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
|
||||||
|
@ -397,7 +397,7 @@ bool Comms::RecvFD(int* fd) {
|
||||||
int* fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
|
int* fds = reinterpret_cast<int*>(CMSG_DATA(cmsg));
|
||||||
*fd = fds[0];
|
*fd = fds[0];
|
||||||
#ifdef MEMORY_SANITIZER
|
#ifdef MEMORY_SANITIZER
|
||||||
ANNOTATE_MEMORY_IS_INITIALIZED(fd, sizeof(int));
|
ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(fd, sizeof(int));
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user