mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 11:20:58 +01:00
Correct the returned UDP datagram length. See the PR for a more comprehensive
description of the fix. PR: misc/25503 Submitted by: Jim Browne <jbrowne@jbrowne.com> MFC after: 1 week
This commit is contained in:
parent
dc46262eaa
commit
a5af32a054
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77370
@ -267,6 +267,7 @@ readudp(d, pkt, len, tleft)
|
||||
return -1;
|
||||
}
|
||||
|
||||
n -= sizeof(*ip) + sizeof(*uh);
|
||||
n = (n > (ntohs(uh->uh_ulen) - sizeof(*uh))) ?
|
||||
ntohs(uh->uh_ulen) - sizeof(*uh) : n;
|
||||
return (n);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user