summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-11-14 18:07:50 +0000
committerume <ume@FreeBSD.org>2003-11-14 18:07:50 +0000
commitbad03e121037dd04ec493301a153a5b95bf7840b (patch)
tree6b809af3133177d869430a8d41984af68ebd5f38 /lib/libc
parent4d342b5b2bb7f2ae7f947bed3b5d8f0869908c70 (diff)
downloadFreeBSD-src-bad03e121037dd04ec493301a153a5b95bf7840b.zip
FreeBSD-src-bad03e121037dd04ec493301a153a5b95bf7840b.tar.gz
u_int8_t cannot carry a number greater than 255.
Reported by: nectar
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/ip6opt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libc/net/ip6opt.c b/lib/libc/net/ip6opt.c
index d0122e2..73f7e3a 100644
--- a/lib/libc/net/ip6opt.c
+++ b/lib/libc/net/ip6opt.c
@@ -113,8 +113,6 @@ inet6_option_append(cmsg, typep, multx, plusy)
return(-1);
if (plusy < 0 || plusy > 7)
return(-1);
- if (typep[0] > 255)
- return(-1);
/*
* If this is the first option, allocate space for the
@@ -422,7 +420,7 @@ inet6_opt_append(void *extbuf, socklen_t extlen, int offset, u_int8_t type,
* The option type must have a value from 2 to 255, inclusive.
* (0 and 1 are reserved for the Pad1 and PadN options, respectively.)
*/
- if (type < 2 || type > 255)
+ if (type < 2)
return(-1);
/*
OpenPOWER on IntegriCloud