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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to