Module Name: src
Committed By: christos
Date: Wed May 3 21:28:00 UTC 2017
Modified Files:
src/usr.sbin/rpcbind: rpcb_svc_com.c
Log Message:
Limit size of buffer:
https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt
XXX: pullup-7
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/rpcbind/rpcb_svc_com.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rpcbind/rpcb_svc_com.c
diff -u src/usr.sbin/rpcbind/rpcb_svc_com.c:1.18 src/usr.sbin/rpcbind/rpcb_svc_com.c:1.19
--- src/usr.sbin/rpcbind/rpcb_svc_com.c:1.18 Tue Nov 10 13:04:51 2015
+++ src/usr.sbin/rpcbind/rpcb_svc_com.c Wed May 3 17:28:00 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: rpcb_svc_com.c,v 1.18 2015/11/10 18:04:51 christos Exp $ */
+/* $NetBSD: rpcb_svc_com.c,v 1.19 2017/05/03 21:28:00 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -45,6 +45,7 @@
#include <sys/socket.h>
#include <rpc/rpc.h>
#include <rpc/rpcb_prot.h>
+#include <rpc/rpc_com.h>
#include <netconfig.h>
#include <errno.h>
#include <syslog.h>
@@ -421,7 +422,8 @@ rpcbproc_taddr2uaddr_com(void *arg, stru
static bool_t
xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
{
- return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));
+ return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen),
+ RPC_MAXDATASIZE));
}
/*