Author: pjd Date: Sun Jul 1 16:26:07 2012 New Revision: 237931 URL: http://svn.freebsd.org/changeset/base/237931
Log: Check if there is cmsg at all. MFC after: 3 days Modified: head/sbin/hastd/proto_common.c Modified: head/sbin/hastd/proto_common.c ============================================================================== --- head/sbin/hastd/proto_common.c Sun Jul 1 15:43:52 2012 (r237930) +++ head/sbin/hastd/proto_common.c Sun Jul 1 16:26:07 2012 (r237931) @@ -181,7 +181,7 @@ proto_descriptor_recv(int sock, int *fdp return (errno); cmsg = CMSG_FIRSTHDR(&msg); - if (cmsg->cmsg_level != SOL_SOCKET || + if (cmsg == NULL || cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) { return (EINVAL); } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"