This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #15374] Make getent services compliant with RFC 6335 section 5.1


On Thu, Oct 31, 2013 at 01:28:48PM -0700, Roland McGrath wrote:
> A leading - is not valid.  So use strtoul.

This is guarded by 

+         if (0 <= port && port <= 65535)
+           serv = getservbyport (htons (port), proto);

so negative numebers will not be matched. User still can specify -0 to
get port 0 which is bit questionable.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]