forked from pool/libtirpc
c3b2cb84b1
- Update to upstream 0.2.5 release - Add symbol versioning to fix symbol conflicts (001-symbol-versions-v2.patch), but disable until commited upstream - Adjust libtirpc-clnt_broadcast_fix.patch and rename to 002-clnt_broadcast_fix.patch - Adjust libtirpc-rpc_broadcast_misformed_replies.patch and rename to 003-rpc_broadcast_misformed_replies.patch - Rename libtirpc-getpmaphandle.patch to 004-getpmaphandle.patch - Adjust libtirpc-bindresvport_blacklist.patch and rename to 000-bindresvport_blacklist.patch - Drop libtirpc-pmap-setunset.patch, not needed anymore - Apply libtirpc-new-path-rpcbindsock.patch only on openSUSE 13.1 and later OBS-URL: https://build.opensuse.org/request/show/265252 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=41
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
commit 8d096a0572b955835f7f64f267a29047091e0a8e
|
|
Author: Olaf Kirch <okir@suse.de>
|
|
Date: Wed Nov 12 16:10:53 2008 +0100
|
|
|
|
Fix a bug in clnt broadcast
|
|
|
|
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>
|
|
|
|
diff --git a/src/clnt_bcast.c b/src/clnt_bcast.c
|
|
index aa2b8f2..899eb76 100644
|
|
--- a/src/clnt_bcast.c
|
|
+++ b/src/clnt_bcast.c
|
|
@@ -588,9 +588,11 @@
|
|
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 */
|