svn commit: r288511 - in stable: 10/usr.sbin/rpcbind 9/usr.sbin/rpcbind

Xin LI delphij at FreeBSD.org
Fri Oct 2 16:36:17 UTC 2015


Author: delphij
Date: Fri Oct  2 16:36:16 2015
New Revision: 288511
URL: https://svnweb.freebsd.org/changeset/base/288511

Log:
  Fix a regression with SA-15:24 patch that prevented NIS from
  working.

Modified:
  stable/9/usr.sbin/rpcbind/rpcb_svc_com.c

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/rpcbind/rpcb_svc_com.c

Modified: stable/9/usr.sbin/rpcbind/rpcb_svc_com.c
==============================================================================
--- stable/9/usr.sbin/rpcbind/rpcb_svc_com.c	Fri Oct  2 16:35:41 2015	(r288510)
+++ stable/9/usr.sbin/rpcbind/rpcb_svc_com.c	Fri Oct  2 16:36:16 2015	(r288511)
@@ -1053,12 +1053,15 @@ static bool_t
 netbuf_copybuf(struct netbuf *dst, const struct netbuf *src)
 {
 
-	assert(dst->buf == NULL);
+	if (dst->len != src->len || dst->buf == NULL) {
+		if (dst->buf != NULL)
+			free(dst->buf);
+		if ((dst->buf = malloc(src->len)) == NULL)
+			return (FALSE);
 
-	if ((dst->buf = malloc(src->len)) == NULL)
-		return (FALSE);
+		dst->maxlen = dst->len = src->len;
+	}
 
-	dst->maxlen = dst->len = src->len;
 	memcpy(dst->buf, src->buf, src->len);
 	return (TRUE);
 }


More information about the svn-src-stable-9 mailing list