Fix the adding of padding to COOKIE-ECHO chunks.
Thanks to Mark Wodrich who found this issue while fuzz testing the usrsctp stack and reported the issue in https://github.com/sctplab/usrsctp/issues/382 MFC after: 3 days
This commit is contained in:
parent
ddf6ddca2c
commit
353256a9ce
@ -9059,8 +9059,7 @@ sctp_send_cookie_echo(struct mbuf *m,
|
||||
pad = 4 - pad;
|
||||
}
|
||||
if (pad > 0) {
|
||||
cookie = sctp_pad_lastmbuf(cookie, pad, NULL);
|
||||
if (cookie == NULL) {
|
||||
if (sctp_pad_lastmbuf(cookie, pad, NULL) == NULL) {
|
||||
return (-8);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user