Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Apr 2013 18:07:38 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, "George V. Neville-Neil" <gnn@FreeBSD.org>, svn-src-all@freebsd.org, src-committers@freebsd.org, rmacklem@FreeBSD.org
Subject:   Re: svn commit: r249096 - head/sys/rpc/rpcsec_gss
Message-ID:  <2007861569.528886.1365113258414.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <20130404152046.GO76816@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Glebius wrote:
> George, Rick,
> 
> On Thu, Apr 04, 2013 at 03:16:54PM +0000, George V. Neville-Neil
> wrote:
> G> Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c
> G>
> ==============================================================================
> G> --- head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:03:12
> 2013 (r249095)
> G> +++ head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:16:53
> 2013 (r249096)
> G> @@ -208,6 +208,8 @@ m_trim(struct mbuf *m, int len)
> G> struct mbuf *n;
> G> int off;
> G>
> G> + if (m == NULL)
> G> + return;
> G> n = m_getptr(m, len, &off);
> G> if (n) {
> G> n->m_len = off;
> 
> I think the code will be much more rocksolid, if the function won't be
> called with NULL argument.
> 
Oops, my confusion. I thought you were suggesting the above change. I
suppose the callers should be fixed as well, but having the check here
seems like a good idea?

Feel free to add code to the callers to check for a NULL m arguement, rick

> --
> Totus tuus, Glebius.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2007861569.528886.1365113258414.JavaMail.root>