On 2008-11-17 17:51:52 (+0100), Pawel Jakub Dawidek <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]                               subscribed to the list.

  The worse your line is tangled, the better is the
  fishing around you.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to