Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The sender no longer removes the duplicate names from the file list -- we
[rsync/rsync.git]
/
access.c
diff --git
a/access.c
b/access.c
index
d792eaf
..
b05059f
100644
(file)
--- a/
access.c
+++ b/
access.c
@@
-51,7
+51,8
@@
static void make_mask(char *mask, int plen, int addrlen) {
if (w)
memset(mask, 0xff, w);
if (w)
memset(mask, 0xff, w);
- mask[w] = 0xff & (0xff<<(8-b));
+ if (w < addrlen)
+ mask[w] = 0xff & (0xff<<(8-b));
if (w+1 < addrlen)
memset(mask+w+1, 0, addrlen-w-1);
if (w+1 < addrlen)
memset(mask+w+1, 0, addrlen-w-1);
@@
-121,6
+122,8
@@
static int match_address(char *addr, char *tok)
a = (char *)&sin6a->sin6_addr;
t = (char *)&sin6t->sin6_addr;
a = (char *)&sin6a->sin6_addr;
t = (char *)&sin6t->sin6_addr;
+ addrlen = 16;
+
#ifdef HAVE_SOCKADDR_IN6_SCOPE_ID
if (sin6t->sin6_scope_id &&
sin6a->sin6_scope_id != sin6t->sin6_scope_id) {
#ifdef HAVE_SOCKADDR_IN6_SCOPE_ID
if (sin6t->sin6_scope_id &&
sin6a->sin6_scope_id != sin6t->sin6_scope_id) {
@@
-129,10
+132,6
@@
static int match_address(char *addr, char *tok)
}
#endif
}
#endif
- a = (char *)&sin6a->sin6_addr;
- t = (char *)&sin6t->sin6_addr;
- addrlen = 16;
-
break;
}
#endif
break;
}
#endif