Before calling the replyproc function on a broadcast reply,
we convert the server-provided address using uaddr2taddr.
This may fail (eg if the server provided a garbage address),
and return NULL. In this case, we should not call the replyproc
function - because the caller expects the address netbuf to
be a valid pointer, rather than NULL.
Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
LIBTIRPC_DEBUG(3, ("rpc_broadcast_exp: uaddr %s\n", uaddrp));
np = uaddr2taddr(
fdlist[i].nconf, uaddrp);
- done = (*eachresult)(resultsp,
- np, fdlist[i].nconf);
- free(np);
+ if (np != NULL) {
+ done = (*eachresult)(resultsp,
+ np, fdlist[i].nconf);
+ free(np);
+ }
#ifdef PORTMAP
}
#endif /* PORTMAP */