mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Fix LSRR option length check: it has to be less or equal remained header's
length minus sizeof(struct ip). MFC after: 1 week
This commit is contained in:
parent
acd386159a
commit
3c721ab3c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105624
@ -957,7 +957,8 @@ pr_pack(buf, cc, from, tv)
|
||||
j = cp[IPOPT_OLEN] - IPOPT_MINOFF + 1;
|
||||
hlen -= 2;
|
||||
cp += 2;
|
||||
if (j >= INADDR_LEN && j <= hlen - INADDR_LEN) {
|
||||
if (j >= INADDR_LEN &&
|
||||
j <= hlen - (int)sizeof(struct ip)) {
|
||||
for (;;) {
|
||||
bcopy(++cp, &ina.s_addr, INADDR_LEN);
|
||||
if (ina.s_addr == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user