From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 14:08:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA670106566B; Fri, 9 Mar 2012 14:08:46 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 73A9F8FC08; Fri, 9 Mar 2012 14:08:46 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F144725D3893; Fri, 9 Mar 2012 14:08:44 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id ECE1ABDD076; Fri, 9 Mar 2012 14:08:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Ke+7pW-tadTJ; Fri, 9 Mar 2012 14:08:42 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B2932BDD075; Fri, 9 Mar 2012 14:08:42 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203091312.q29DCXLJ008313@svn.freebsd.org> Date: Fri, 9 Mar 2012 14:08:41 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <6E2D25B4-B9BC-4D51-98BF-FDE1EDDED7CB@lists.zabbadoz.net> References: <201203091312.q29DCXLJ008313@svn.freebsd.org> To: Michael Tuexen X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232723 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 14:08:47 -0000 On 9. Mar 2012, at 13:12 , Michael Tuexen wrote: > Author: tuexen > Date: Fri Mar 9 13:12:33 2012 > New Revision: 232723 > URL: http://svn.freebsd.org/changeset/base/232723 >=20 > Log: > Fix a bug reported by Peter Holm which results in a crash: > Verify in sctp_peeloff() that the socket is a one-to-many > style SCTP socket. /scratch/tmp/bz/head.svn/sys/netinet/sctp_peeloff.c: In function = 'sctp_can_peel_off': /scratch/tmp/bz/head.svn/sys/netinet/sctp_peeloff.c:59: warning: 'inp' = is used uninitialized in this function >=20 > MFC after: 3 days. >=20 > Modified: > head/sys/netinet/sctp_peeloff.c >=20 > Modified: head/sys/netinet/sctp_peeloff.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:06:24 2012 = (r232722) > +++ head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:12:33 2012 = (r232723) > @@ -55,6 +55,15 @@ sctp_can_peel_off(struct socket *head, s > struct sctp_tcb *stcb; > uint32_t state; >=20 > + if (head =3D=3D NULL) { > + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EBADF); > + return (EBADF); > + } > + if ((head->so_proto->pr_protocol !=3D IPPROTO_SCTP) || > + (head->so_type !=3D SOCK_SEQPACKET)) { > + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); > + return (EOPNOTSUPP); > + } > inp =3D (struct sctp_inpcb *)head->so_pcb; > if (inp =3D=3D NULL) { > SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EFAULT); --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!