Date: Tue, 4 Feb 2014 20:28:43 -0500 From: Eitan Adler <eadler@freebsd.org> To: Bruce Evans <brde@optusnet.com.au> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r261454 - head/lib/libc/net Message-ID: <CAF6rxg=yV6RN6Pez9hwuP8=DG5=RGQ9JZ9ZdPEzW3iqw1m-h0g@mail.gmail.com> In-Reply-To: <20140204164703.S1229@besplex.bde.org> References: <201402040301.s1431XgK027156@svn.freebsd.org> <20140204164703.S1229@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 4, 2014 at 1:29 AM, Bruce Evans <brde@optusnet.com.au> wrote: > On Tue, 4 Feb 2014, Eitan Adler wrote: > >> Log: >> libc/net: Fix some issues in inet6_opt_init() (from RFC 3542): >> >> * The RFC says (in section 10.1) that only when extbuf is not NULL, >> extlen shall be checked, so don't perform this check when NULL is >> passed. >> >> * socklen_t is unsigned, so checking extlen for less than zero is >> not needed. > > > Why be so unportable? socklen_t is not necessarily unsigned. When I checked prior to commit I read '<sys/socket.h> makes available a type, socklen_t, which is an unsigned opaque integral type of length of at least 32 bits. ' After checking again it turns out that this quote is from SUSv2 which is just a bit old. In any case switching the line to <= 0 won't add any real value now. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxg=yV6RN6Pez9hwuP8=DG5=RGQ9JZ9ZdPEzW3iqw1m-h0g>