Date: Mon, 17 Nov 2008 10:27:44 -0800 From: Philip Paeps <philip@freebsd.org> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185021 - head/sys/dev/glxsb Message-ID: <20081117182744.GN17340@detritus.paeps.cx> In-Reply-To: <20081117165006.GA1489@garage.freebsd.pl> References: <200811170709.mAH79ecr075977@svn.freebsd.org> <20081117165006.GA1489@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2008-11-17 17:51:52 (+0100), Pawel Jakub Dawidek <pjd@FreeBSD.org> wrote: > On Mon, Nov 17, 2008 at 07:09:40AM +0000, Philip Paeps wrote: > > Fix two possible (but unlikely) NULL-pointer dereferences in glxsb(4). > > > > [...] > > > > - while ((ses = TAILQ_FIRST(&sc->sc_sessions)) != NULL) { > > + while (!TAILQ_EMPTY(&sc->sc_sessions)) { > > + ses = TAILQ_FIRST(&sc->sc_sessions); > > This is perfectly valid, and if it was reported by coverity, it is a > false positive. True. Sorry for the noise. Reminds me to find a way to get Coverity not to complain about this. > > - if (crp == NULL || > > - crp->crp_callback == NULL || crp->crp_desc == NULL) { > > + /* Sanity check. */ > > + if (crp == NULL) > > + return (EINVAL); > > + > > + if (crp->crp_callback == NULL || crp->crp_desc == NULL) { > > error = EINVAL; > > goto fail; > > } > > This one is ok. The same one exists in padlock(4), could you fix it too? Will do. Thanks. - Philip -- Philip Paeps Please don't Cc me, I am philip@freebsd.org subscribed to the list. The worse your line is tangled, the better is the fishing around you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081117182744.GN17340>