2008-10-06 18:14:39 +02:00
|
|
|
From 95c8f7227e6b15f2e430d7b87dadc95b2acd4a61 Mon Sep 17 00:00:00 2001
|
2008-09-05 21:56:33 +02:00
|
|
|
From: Olaf Kirch <okir@suse.de>
|
2008-10-06 18:14:39 +02:00
|
|
|
Date: Tue, 2 Sep 2008 12:09:39 -0400
|
|
|
|
Subject: [PATCH] Fix incorrect sizeof() in __rpc_getbroadifs
|
2008-09-05 21:56:33 +02:00
|
|
|
|
|
|
|
__rpc_getbroadifs returns bad broadcast addresses on 32bit
|
|
|
|
machines because when copying the broadcast addresses, ite
|
|
|
|
applies the sizeof() operator to a pointer to a sockaddr,
|
|
|
|
rather than the sockaddr itself.
|
|
|
|
|
|
|
|
Signed-off-by: Olaf Kirch <okir@suse.de>
|
2008-10-06 18:14:39 +02:00
|
|
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
---
|
|
|
|
src/clnt_bcast.c | 2 +-
|
|
|
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
2008-09-05 21:56:33 +02:00
|
|
|
|
2008-10-06 18:14:39 +02:00
|
|
|
diff --git a/src/clnt_bcast.c b/src/clnt_bcast.c
|
|
|
|
index a96db45..aa2b8f2 100644
|
|
|
|
--- a/src/clnt_bcast.c
|
|
|
|
+++ b/src/clnt_bcast.c
|
|
|
|
@@ -163,7 +163,7 @@ __rpc_getbroadifs(int af, int proto, int socktype, broadlist_t *list)
|
2008-09-05 21:56:33 +02:00
|
|
|
/* memcpy(&bip->broadaddr, ifap->ifa_broadaddr,
|
|
|
|
(size_t)ifap->ifa_broadaddr->sa_len);*/
|
|
|
|
memcpy(&bip->broadaddr, ifap->ifa_broadaddr,
|
|
|
|
- (size_t)sizeof(ifap->ifa_broadaddr));
|
|
|
|
+ sizeof(bip->broadaddr));
|
|
|
|
sin = (struct sockaddr_in *)(void *)&bip->broadaddr;
|
|
|
|
sin->sin_port =
|
|
|
|
((struct sockaddr_in *)
|
2008-10-06 18:14:39 +02:00
|
|
|
--
|
|
|
|
1.5.6
|
|
|
|
|