From: Mark Wooding Date: Wed, 1 Mar 2006 00:36:31 +0000 (+0000) Subject: noip: Fix ACL parsing bug in port ranges. X-Git-Tag: 1.0.1~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/preload-hacks/commitdiff_plain/d83beb5cca7dd92aed2804f847b3eb3f684f8d40?ds=inline;hp=-c noip: Fix ACL parsing bug in port ranges. The code failed to skip past the `-' separating the parts of the port range, so the max port always got forced to zero. Less than useful, really. --- d83beb5cca7dd92aed2804f847b3eb3f684f8d40 diff --git a/noip.c b/noip.c index 2e2f1b1..152540d 100644 --- a/noip.c +++ b/noip.c @@ -522,7 +522,7 @@ static void parse_ports(char **pp, unsigned short *min, unsigned short *max) NEXTNUMBER(q, del); *min = strtoul(q, 0, 0); RESCAN(del); SKIPSPC; if (*p == '-') - { NEXTNUMBER(q, del); *max = strtoul(q, 0, 0); RESCAN(del); } + { p++; NEXTNUMBER(q, del); *max = strtoul(q, 0, 0); RESCAN(del); } else *max = *min; }