svn commit: r249096 - head/sys/rpc/rpcsec_gss

Rick Macklem rmacklem at uoguelph.ca
Thu Apr 4 22:04:38 UTC 2013


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;
Yep. If I recall correctly, my patch checked for a non-NULL argument
before calling m_trim(), but adding this sanity check seems like a
good idea to me, if only to avoid problems caused by modified calls
to m_trim() in the future.

I'd think you could just commit this without so@'s involvement? rick

> 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.
> 
> --
> Totus tuus, Glebius.


More information about the svn-src-all mailing list