Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/rpcbind Pull up revisions 1.6-1.7 (requested b...
details: https://anonhg.NetBSD.org/src/rev/3e1ece7ec412
branches: netbsd-1-5
changeset: 491521:3e1ece7ec412
user: he <he%NetBSD.org@localhost>
date: Tue May 01 12:12:13 2001 +0000
description:
Pull up revisions 1.6-1.7 (requested by fvdl):
Fix some minor security-related issues.
diffstat:
usr.sbin/rpcbind/util.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r 8af1d06d1e98 -r 3e1ece7ec412 usr.sbin/rpcbind/util.c
--- a/usr.sbin/rpcbind/util.c Tue May 01 12:11:56 2001 +0000
+++ b/usr.sbin/rpcbind/util.c Tue May 01 12:12:13 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.2.2.2 2000/08/05 17:47:14 fvdl Exp $ */
+/* $NetBSD: util.c,v 1.2.2.3 2001/05/01 12:12:13 he Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -144,15 +144,30 @@
serv_sa = (struct sockaddr *)serv_nbp->buf;
if (clnt_uaddr != NULL) {
clnt_nbp = uaddr2taddr(nconf, clnt_uaddr);
+ if (clnt_nbp == NULL) {
+ free(serv_nbp);
+ return NULL;
+ }
clnt_sa = (struct sockaddr *)clnt_nbp->buf;
+ if (clnt_sa->sa_family == AF_LOCAL) {
+ free(serv_nbp);
+ free(clnt_nbp);
+ free(clnt_sa);
+ return strdup(serv_uaddr);
+ }
} else {
clnt_sa = (struct sockaddr *)
malloc(sizeof (struct sockaddr_storage));
memcpy(clnt_sa, clnt, clnt->sa_len);
}
- if (getifaddrs(&ifp) < 0)
+ if (getifaddrs(&ifp) < 0) {
+ free(serv_nbp);
+ free(clnt_sa);
+ if (clnt_nbp != NULL)
+ free(clnt_nbp);
return 0;
+ }
/*
* Loop through all interfaces. For each interface, see if the
Home |
Main Index |
Thread Index |
Old Index