svn commit: r348057 - head/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Tue May 21 18:05:58 UTC 2019


Author: dchagin
Date: Tue May 21 18:05:57 2019
New Revision: 348057
URL: https://svnweb.freebsd.org/changeset/base/348057

Log:
  Do not use uninitialised sa.
  
  Reported by:	tijl@
  MFC after:	1 week

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c	Tue May 21 18:03:58 2019	(r348056)
+++ head/sys/compat/linux/linux_socket.c	Tue May 21 18:05:57 2019	(r348057)
@@ -1165,7 +1165,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struc
 	if (error != 0)
 		goto bad;
 
-	if (sa) {
+	if (msg->msg_name) {
 		msg->msg_name = PTRIN(linux_msg.msg_name);
 		error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen);
 		if (error == 0)


More information about the svn-src-head mailing list