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

Approved by:	so
This commit is contained in:
delphij 2015-10-02 16:37:06 +00:00 committed by Franco Fichtner
parent da06a78073
commit 2e8d2096f4
3 changed files with 11 additions and 5 deletions

View file

@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
20151002: p22 FreeBSD-SA-15:24.rpcbind [revised]
Revised patch to address a regression that prevents NIS from working.
20150929: p21 FreeBSD-SA-15:24.rpcbind
Fix rpcbind(8) remote denial of service. [SA-15:24]

View file

@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="10.1"
BRANCH="RELEASE-p21"
BRANCH="RELEASE-p22"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi

View file

@ -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);
}