diff options
author | fenner <fenner@FreeBSD.org> | 2001-08-20 17:58:46 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2001-08-20 17:58:46 +0000 |
commit | 1a9e5ae59a8ca7b8155cc8fc9de6684d13b93ecb (patch) | |
tree | d3a2b809f6f234e08c62e084d2ce198a47bcf1f8 /sys/netinet6 | |
parent | 3c068b84c3fe7985cc6e607c4e5846962d30c44c (diff) | |
download | FreeBSD-src-1a9e5ae59a8ca7b8155cc8fc9de6684d13b93ecb.zip FreeBSD-src-1a9e5ae59a8ca7b8155cc8fc9de6684d13b93ecb.tar.gz |
Fix fencepost error causing creation of 0-length mbufs when the boundary
between header and data fell on the boundary between two mbufs.
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/esp_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/esp_core.c b/sys/netinet6/esp_core.c index 0319255..f262531 100644 --- a/sys/netinet6/esp_core.c +++ b/sys/netinet6/esp_core.c @@ -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; } |