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:
parent
a875c63d5a
commit
dfdd53e525
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user