summaryrefslogtreecommitdiffstats
path: root/netwerk/sctp/src/netinet/sctp_auth.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-03-18 11:11:13 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 13:09:51 +0200
commit4adf0d09f770fb6b7211c1f4a262538cac68135e (patch)
treea219071a56e5a121160b7d8155c472b42b122943 /netwerk/sctp/src/netinet/sctp_auth.c
parent22d0b88e375ea3378ec397dc744d36c10112861c (diff)
downloadUXP-4adf0d09f770fb6b7211c1f4a262538cac68135e.tar
UXP-4adf0d09f770fb6b7211c1f4a262538cac68135e.tar.gz
UXP-4adf0d09f770fb6b7211c1f4a262538cac68135e.tar.lz
UXP-4adf0d09f770fb6b7211c1f4a262538cac68135e.tar.xz
UXP-4adf0d09f770fb6b7211c1f4a262538cac68135e.zip
[network] Cherry-pick various sctp lib upstream fixes.
Diffstat (limited to 'netwerk/sctp/src/netinet/sctp_auth.c')
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/netwerk/sctp/src/netinet/sctp_auth.c b/netwerk/sctp/src/netinet/sctp_auth.c
index ee5ca36ce..4e9f7e4cd 100755
--- a/netwerk/sctp/src/netinet/sctp_auth.c
+++ b/netwerk/sctp/src/netinet/sctp_auth.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 271673 2014-09-16 14:20:33Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 355931 2019-12-20 15:25:08Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -1450,7 +1450,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m,
ptype = ntohs(phdr->param_type);
plen = ntohs(phdr->param_length);
- if ((plen == 0) || (offset + plen > length))
+ if ((plen < sizeof(struct sctp_paramhdr)) ||
+ (offset + plen > length))
break;
if (ptype == SCTP_RANDOM) {