if we hit the / that introduces a mask or the % that introduces the
interface specifier (scope id) of a link-local address. */
if we hit the / that introduces a mask or the % that introduces the
interface specifier (scope id) of a link-local address. */
/* If a component starts with an additional colon, we have hit a double
colon. This is permitted to appear once only, and counts as at least
/* If a component starts with an additional colon, we have hit a double
colon. This is permitted to appear once only, and counts as at least
- if (!isdigit(*s++)) return 0;
- if (isdigit(*s) && isdigit(*(++s))) s++;
+ n = strtol(CCS s, CSS &end, 10);
+ if (n > 255 || n < 0 || end <= s || end > s+3) return 0;
+ s = end;
************************************************/
/* This function is used to build a list, returning
an allocated null-terminated growable string. The
************************************************/
/* This function is used to build a list, returning
an allocated null-terminated growable string. The
doubled.
Arguments:
list points to the start of the list that is being built, or NULL
if this is a new list that has no contents yet
doubled.
Arguments:
list points to the start of the list that is being built, or NULL
if this is a new list that has no contents yet