Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7a1f46b
)
Restored an isdigit() check in the match_address() function, but check
author
Wayne Davison
<wayned@samba.org>
Sat, 5 Jul 2003 07:39:57 +0000
(07:39 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 5 Jul 2003 07:39:57 +0000
(07:39 +0000)
the last character in the hostname, not the first.
access.c
patch
|
blob
|
blame
|
history
diff --git
a/access.c
b/access.c
index
b05059f
..
4cbd9a1
100644
(file)
--- a/
access.c
+++ b/
access.c
@@
-79,6
+79,11
@@
static int match_address(char *addr, char *tok)
p = strchr(tok,'/');
if (p) *p = 0;
+ /* skip if last char is not a digit (i.e. not an address) */
+ /* (don't check first char - might be 11.22.33.44.an.isp) */
+ if (!*tok) return 0; /* nothing to check */
+ if (!isdigit(*(unsigned char*)tok+strlen(tok)-1)) return 0;
+
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;