зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613765 - Cherry pick upstream sctp revision 790a7a2; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D62071 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9cea1e5848
Коммит
397f865671
|
@ -34,7 +34,7 @@
|
|||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 334532 2018-06-02 16:28:10Z tuexen $");
|
||||
__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 355931 2019-12-20 15:25:08Z tuexen $");
|
||||
#endif
|
||||
|
||||
#include <netinet/sctp_os.h>
|
||||
|
@ -1455,7 +1455,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) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 345504 2019-03-25 15:23:20Z tuexen $");
|
||||
__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 355931 2019-12-20 15:25:08Z tuexen $");
|
||||
#endif
|
||||
|
||||
#include <netinet/sctp_os.h>
|
||||
|
@ -7251,7 +7251,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
|||
if (offset + plen > limit) {
|
||||
break;
|
||||
}
|
||||
if (plen == 0) {
|
||||
if (plen < sizeof(struct sctp_paramhdr)) {
|
||||
break;
|
||||
}
|
||||
#ifdef INET
|
||||
|
@ -7467,6 +7467,9 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
|||
if (plen > sizeof(lstore)) {
|
||||
return (-23);
|
||||
}
|
||||
if (plen < sizeof(struct sctp_asconf_addrv4_param)) {
|
||||
return (-101);
|
||||
}
|
||||
phdr = sctp_get_next_param(m, offset,
|
||||
(struct sctp_paramhdr *)&lstore,
|
||||
plen);
|
||||
|
|
Загрузка…
Ссылка в новой задаче