Author: delphij
Date: Fri Oct 2 16:35:41 2015
New Revision: 288510
URL: https://svnweb.freebsd.org/changeset/base/288510
Log:
Fix a regression with SA-15:24 patch that prevented NIS from
working.
Modified:
head/usr.sbin/rpcbind/rpcb_svc_com.c
Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c
==============================================================================
--- head/usr.sbin/rpcbind/rpcb_svc_com.c Fri Oct 2 16:30:54 2015
(r288509)
+++ head/usr.sbin/rpcbind/rpcb_svc_com.c Fri Oct 2 16:35:41 2015
(r288510)
@@ -1052,12 +1052,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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"