mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
libc/net: fix a portability issue
* POSIX does not require socklen_t to be unsigned Submitted by: bde MFC After: 1 week (with r261454)
This commit is contained in:
parent
2c32ed5e40
commit
7059326b09
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261502
@ -382,7 +382,7 @@ inet6_opt_init(void *extbuf, socklen_t extlen)
|
||||
struct ip6_ext *ext = (struct ip6_ext *)extbuf;
|
||||
|
||||
if (ext) {
|
||||
if (extlen == 0 || (extlen % 8))
|
||||
if (extlen <= 0 || (extlen % 8))
|
||||
return(-1);
|
||||
ext->ip6e_len = (extlen >> 3) - 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user