Avoid an integer underflow.
MFC after: 3 days
This commit is contained in:
parent
60017c8e88
commit
6395219ae3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361222
@ -1797,9 +1797,9 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset,
|
||||
} /* switch */
|
||||
|
||||
/* update remaining ASCONF-ACK message length to process */
|
||||
ack_length -= SCTP_SIZE32(param_length);
|
||||
if (ack_length <= 0) {
|
||||
/* no more data in the mbuf chain */
|
||||
if (ack_length > SCTP_SIZE32(param_length)) {
|
||||
ack_length -= SCTP_SIZE32(param_length);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
offset += SCTP_SIZE32(param_length);
|
||||
|
Loading…
Reference in New Issue
Block a user