svn commit: r261454 - head/lib/libc/net

Eitan Adler eadler at freebsd.org
Wed Feb 5 01:29:14 UTC 2014


On Tue, Feb 4, 2014 at 1:29 AM, Bruce Evans <brde at 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


More information about the svn-src-head mailing list