| 1233 | } |
| 1234 | |
| 1235 | IOURINGINLINE struct cmsghdr * |
| 1236 | io_uring_recvmsg_cmsg_nexthdr(struct io_uring_recvmsg_out *o, struct msghdr *msgh, |
| 1237 | struct cmsghdr *cmsg) |
| 1238 | LIBURING_NOEXCEPT |
| 1239 | { |
| 1240 | unsigned char *end; |
| 1241 | |
| 1242 | if (cmsg->cmsg_len < sizeof(struct cmsghdr)) |
| 1243 | return NULL; |
| 1244 | end = (unsigned char *) io_uring_recvmsg_cmsg_firsthdr(o, msgh) + |
| 1245 | o->controllen; |
| 1246 | cmsg = (struct cmsghdr *)((unsigned char *) cmsg + |
| 1247 | CMSG_ALIGN(cmsg->cmsg_len)); |
| 1248 | |
| 1249 | if ((unsigned char *) (cmsg + 1) > end) |
| 1250 | return NULL; |
| 1251 | if (((unsigned char *) cmsg) + CMSG_ALIGN(cmsg->cmsg_len) > end) |
| 1252 | return NULL; |
| 1253 | |
| 1254 | return cmsg; |
| 1255 | } |
| 1256 | |
| 1257 | IOURINGINLINE void *io_uring_recvmsg_payload(struct io_uring_recvmsg_out *o, |
| 1258 | struct msghdr *msgh) |
no test coverage detected