8180 Invalid netbuf decoded by xdr_netbuf()

Review Request #477 — Created May 8, 2017 and submitted — Latest diff uploaded

marcel
illumos-gate
master
8180
5ab9496...
general
This fixes the xdr_netbuf() function both in libnsl(3nsl) and in kernel to do
not produce a netbuf structure that violates the netbuf semantics.
I ran the test attached to the bug report:

$ ./test 
maxlen: 65536
len: 1
Segmentation Fault (core dumped)
$ LD_PRELOAD=$CODEMGR_WS/proto/root_i386/usr/lib/libnsl.so.1 ./test 
maxlen: 1
len: 1
$
Loading...