Fix fencepost error causing creation of 0-length mbufs when the boundary

between header and data fell on the boundary between two mbufs.
This commit is contained in:
fenner 2001-08-20 17:58:46 +00:00
parent a875c63d5a
commit dfdd53e525

View File

@ -731,7 +731,7 @@ esp_cbc_decrypt(m, off, sav, algo, ivlen)
/* skip bodyoff */
while (soff < bodyoff) {
if (soff + s->m_len > bodyoff) {
if (soff + s->m_len >= bodyoff) {
sn = bodyoff - soff;
break;
}
@ -941,7 +941,7 @@ esp_cbc_encrypt(m, off, plen, sav, algo, ivlen)
/* skip bodyoff */
while (soff < bodyoff) {
if (soff + s->m_len > bodyoff) {
if (soff + s->m_len >= bodyoff) {
sn = bodyoff - soff;
break;
}