X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/505c7ea2bc0720a44a17c3076dec3e0b87e4ab93..fca9a9b0f044a9ef93cea27dadc01ecd56d1274c:/access.c diff --git a/access.c b/access.c index f1763432..ff357480 100644 --- a/access.c +++ b/access.c @@ -38,7 +38,7 @@ static int match_address(char *addr, char *tok) if (!addr || !*addr) return 0; - if (!isdigit(tok[0])) return 0; + if (!isdigit(* (unsigned char *) tok)) return 0; p = strchr(tok,'/'); if (p) *p = 0; @@ -68,6 +68,7 @@ static int match_address(char *addr, char *tok) mask = ntohl(mask); } else { int bits = atoi(p+1); + if (bits == 0) return 1; if (bits <= 0 || bits > 32) { rprintf(FERROR,"malformed mask in %s\n", tok); return 0;