This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH COMMITTED] inet_pton: Reject IPv6 addresses with many leading zeros [BZ #16637]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 24 Jun 2017 11:46:50 +0200
- Subject: Re: [PATCH COMMITTED] inet_pton: Reject IPv6 addresses with many leading zeros [BZ #16637]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0CCB62FE559
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0CCB62FE559
- References: <20170623210609.71FE4439942F0@oldenburg.str.redhat.com> <m2r2y9vpod.fsf@linux-m68k.org>
On 06/24/2017 08:57 AM, Andreas Schwab wrote:
> On Jun 23 2017, fweimer@redhat.com (Florian Weimer) wrote:
>
>> unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
>> const char *curtok;
>> - int ch, saw_xdigit;
>> + int ch;
>> + size_t xdigits_seen; /* Number of hex digits since colon. */
>
> No need for size_t, it can only be 4 at most.
Should I change it to unsigned int?
Thanks,
Florian