Fix a use of an uninitialized pointer in xdr_rpcbs_rmtcalllist().
This appears to have been introduced in r173763. Also fix the confusing indentation that probably led to the bug in the first place. PR: 243759 Diagnosed by: martin@lispworks.com MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
51d7f2ed58
commit
a3a706387e
@ -54,29 +54,28 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp)
|
|||||||
{
|
{
|
||||||
struct rpcbs_addrlist **pnext;
|
struct rpcbs_addrlist **pnext;
|
||||||
|
|
||||||
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!xdr_rpcvers(xdrs, &objp->vers)) {
|
if (!xdr_rpcvers(xdrs, &objp->vers)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!xdr_int(xdrs, &objp->success)) {
|
if (!xdr_int(xdrs, &objp->success)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!xdr_int(xdrs, &objp->failure)) {
|
if (!xdr_int(xdrs, &objp->failure)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
|
if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pnext = &objp->next;
|
pnext = &objp->next;
|
||||||
|
if (!xdr_pointer(xdrs, (char **) pnext,
|
||||||
if (!xdr_pointer(xdrs, (char **) pnext,
|
|
||||||
sizeof (rpcbs_addrlist),
|
sizeof (rpcbs_addrlist),
|
||||||
(xdrproc_t)xdr_rpcbs_addrlist)) {
|
(xdrproc_t)xdr_rpcbs_addrlist)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
@ -86,86 +85,86 @@ xdr_rpcbs_addrlist(XDR *xdrs, rpcbs_addrlist *objp)
|
|||||||
bool_t
|
bool_t
|
||||||
xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp)
|
xdr_rpcbs_rmtcalllist(XDR *xdrs, rpcbs_rmtcalllist *objp)
|
||||||
{
|
{
|
||||||
int32_t *buf;
|
|
||||||
struct rpcbs_rmtcalllist **pnext;
|
struct rpcbs_rmtcalllist **pnext;
|
||||||
|
int32_t *buf;
|
||||||
|
|
||||||
if (xdrs->x_op == XDR_ENCODE) {
|
|
||||||
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
|
|
||||||
if (buf == NULL) {
|
|
||||||
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_rpcvers(xdrs, &objp->vers)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_rpcproc(xdrs, &objp->proc)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_int(xdrs, &objp->success)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_int(xdrs, &objp->failure)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_int(xdrs, &objp->indirect)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
IXDR_PUT_U_INT32(buf, objp->prog);
|
|
||||||
IXDR_PUT_U_INT32(buf, objp->vers);
|
|
||||||
IXDR_PUT_U_INT32(buf, objp->proc);
|
|
||||||
IXDR_PUT_INT32(buf, objp->success);
|
|
||||||
IXDR_PUT_INT32(buf, objp->failure);
|
|
||||||
IXDR_PUT_INT32(buf, objp->indirect);
|
|
||||||
}
|
|
||||||
if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
pnext = &objp->next;
|
pnext = &objp->next;
|
||||||
if (!xdr_pointer(xdrs, (char **) pnext,
|
if (xdrs->x_op == XDR_ENCODE) {
|
||||||
sizeof (rpcbs_rmtcalllist),
|
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
|
||||||
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
|
if (buf == NULL) {
|
||||||
return (FALSE);
|
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
||||||
}
|
return (FALSE);
|
||||||
return (TRUE);
|
}
|
||||||
|
if (!xdr_rpcvers(xdrs, &objp->vers)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_rpcproc(xdrs, &objp->proc)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_int(xdrs, &objp->success)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_int(xdrs, &objp->failure)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_int(xdrs, &objp->indirect)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
IXDR_PUT_U_INT32(buf, objp->prog);
|
||||||
|
IXDR_PUT_U_INT32(buf, objp->vers);
|
||||||
|
IXDR_PUT_U_INT32(buf, objp->proc);
|
||||||
|
IXDR_PUT_INT32(buf, objp->success);
|
||||||
|
IXDR_PUT_INT32(buf, objp->failure);
|
||||||
|
IXDR_PUT_INT32(buf, objp->indirect);
|
||||||
|
}
|
||||||
|
if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_pointer(xdrs, (char **) pnext,
|
||||||
|
sizeof (rpcbs_rmtcalllist),
|
||||||
|
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
return (TRUE);
|
||||||
} else if (xdrs->x_op == XDR_DECODE) {
|
} else if (xdrs->x_op == XDR_DECODE) {
|
||||||
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
|
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_rpcvers(xdrs, &objp->vers)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_rpcproc(xdrs, &objp->proc)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_int(xdrs, &objp->success)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_int(xdrs, &objp->failure)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
if (!xdr_int(xdrs, &objp->indirect)) {
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
objp->prog = (rpcprog_t)IXDR_GET_U_INT32(buf);
|
||||||
|
objp->vers = (rpcvers_t)IXDR_GET_U_INT32(buf);
|
||||||
|
objp->proc = (rpcproc_t)IXDR_GET_U_INT32(buf);
|
||||||
|
objp->success = (int)IXDR_GET_INT32(buf);
|
||||||
|
objp->failure = (int)IXDR_GET_INT32(buf);
|
||||||
|
objp->indirect = (int)IXDR_GET_INT32(buf);
|
||||||
|
}
|
||||||
|
if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!xdr_rpcvers(xdrs, &objp->vers)) {
|
if (!xdr_pointer(xdrs, (char **) pnext,
|
||||||
|
sizeof (rpcbs_rmtcalllist),
|
||||||
|
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (!xdr_rpcproc(xdrs, &objp->proc)) {
|
return (TRUE);
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_int(xdrs, &objp->success)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_int(xdrs, &objp->failure)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_int(xdrs, &objp->indirect)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
objp->prog = (rpcprog_t)IXDR_GET_U_INT32(buf);
|
|
||||||
objp->vers = (rpcvers_t)IXDR_GET_U_INT32(buf);
|
|
||||||
objp->proc = (rpcproc_t)IXDR_GET_U_INT32(buf);
|
|
||||||
objp->success = (int)IXDR_GET_INT32(buf);
|
|
||||||
objp->failure = (int)IXDR_GET_INT32(buf);
|
|
||||||
objp->indirect = (int)IXDR_GET_INT32(buf);
|
|
||||||
}
|
|
||||||
if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (!xdr_pointer(xdrs, (char **) pnext,
|
|
||||||
sizeof (rpcbs_rmtcalllist),
|
|
||||||
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
return (TRUE);
|
|
||||||
}
|
}
|
||||||
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
if (!xdr_rpcprog(xdrs, &objp->prog)) {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user