aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 11d7e794da00..d31d91d9ef91 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -2386,7 +2386,7 @@ sosend_generic_locked(struct socket *so, struct sockaddr *addr, struct uio *uio,
if (control != NULL) {
struct cmsghdr *cm = mtod(control, struct cmsghdr *);
- if (clen >= sizeof(*cm) &&
+ if (clen >= CMSG_LEN(sizeof(tls_rtype)) &&
cm->cmsg_type == TLS_SET_RECORD_TYPE) {
tls_rtype = *((uint8_t *)CMSG_DATA(cm));
clen = 0;