freebsd-dev/sys/xdr
Rick Macklem e9200ba65b MFC r196149:
Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline()
so that it returns failure instead of crashing when "m->m_len" is
executed and m == NULL. The mbuf ptr can be NULL when a call to
xdrmbuf_getbytes() gets the bytes it needs, but they are at the end
of a short RPC reply. When this happens, xdrmbuf_getbytes() returns
success, but advances the mbuf ptr (xdrs->x_private) to m_next, which
is NULL. If this is followed by a call to xdrmbuf_getlong(), it calls
xdrmbuf_inline(), which would cause a crash by accessing "m->m_len".

Approved by:	re (rwatson), kib (mentor)
2009-08-12 20:30:27 +00:00
..
xdr_array.c
xdr_mbuf.c MFC r196149: 2009-08-12 20:30:27 +00:00
xdr_mem.c MFdevbranch 192944 2009-05-28 08:18:12 +00:00
xdr_reference.c
xdr_sizeof.c
xdr.c