Thread (7 messages) 7 messages, 3 authors, 2021-03-25

Re: [PATCH] [RFC] can: fix msg_namelen values depending on CAN_REQUIRED_SIZE

From: Richard Weinberger <richard@nod.at>
Date: 2021-03-24 22:20:33

Oliver,

----- Ursprüngliche Mail -----
quoted hunk ↗ jump to hunk
@@ -808,10 +810,13 @@ static int raw_recvmsg(struct socket *sock, struct msghdr
*msg, size_t size,
	int noblock;

	noblock = flags & MSG_DONTWAIT;
	flags &= ~MSG_DONTWAIT;

+	if (msg->msg_name && msg->msg_namelen < RAW_MIN_NAMELEN)
+		return -EINVAL;
+
Like with Kurt's patch, my test fails here too because msg->msg_namelen is 0.
->msg_namelen is always 0 in the recvfrom() case.

Thanks,
//richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help