Skip to content

Commit

Permalink
SUNRPC: rpcb_getport_sync() passes incorrect address size to rpc_crea…
Browse files Browse the repository at this point in the history
…te()

The variable "sin" is a pointer, so sizeof(sin) is the size of a pointer,
not the size of thing that sin points to.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 30, 2008
1 parent 67d6021 commit afc8811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ int rpcb_getport_sync(struct sockaddr_in *sin, u32 prog, u32 vers, int prot)
__FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);

rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin,
sizeof(sin), prot, 2, 0);
sizeof(*sin), prot, 2, 0);
if (IS_ERR(rpcb_clnt))
return PTR_ERR(rpcb_clnt);

Expand Down

0 comments on commit afc8811

Please sign in to comment.