Commit 44c6b461 authored by Kenton Varda's avatar Kenton Varda

Fix bug when multiple cmsgs are present.

I don't really know how to test this since the other cmsg types are bizarre and non-portable, but they do exist.
parent 11f612a9
......@@ -405,6 +405,12 @@ private:
}
}
}
if (spaceLeft >= CMSG_LEN(0) && spaceLeft >= cmsg->cmsg_len) {
spaceLeft -= cmsg->cmsg_len;
} else {
spaceLeft = 0;
}
}
#ifndef MSG_CMSG_CLOEXEC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment