mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-19 04:21:22 -04:00
fixed bug in replacement inet_aton()
This commit is contained in:
1 parent
269833af78
commit
14175f1e77
1 file changed
+2
-2
+2
-2
@@ -155,12 +155,12 @@
|
||||
|
||||
if (strcmp(cp, "255.255.255.255") == 0) {
|
||||
inp->s_addr = (unsigned) -1;
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sscanf(cp, "%u.%u.%u.%u", &a1, &a2, &a3, &a4) != 4 ||
|
||||
a1 > 255 || a2 > 255 || a3 > 255 || a4 > 255) {
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
|
||||
|
||||
Reference in new issue
Block a user