Date: Wed, 30 Mar 2005 05:24:14 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 74084 for review Message-ID: <200503300524.j2U5OEQE005078@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=74084 Change 74084 by sam@sam_ebb on 2005/03/30 05:23:39 misc coverity fixes kame awaiting kame review Affected files ... .. //depot/projects/wifi/sys/netinet6/ah_core.c#4 edit .. //depot/projects/wifi/sys/netinet6/esp_core.c#3 edit Differences ... ==== //depot/projects/wifi/sys/netinet6/ah_core.c#4 (text+ko) ==== @@ -1400,8 +1400,6 @@ (algo->result)(&algos, sumbuf, sizeof(sumbuf)); bcopy(&sumbuf[0], ahdat, (*algo->sumsiz)(sav)); - if (n) - m_free(n); return error; fail: @@ -1632,9 +1630,6 @@ (algo->result)(&algos, sumbuf, sizeof(sumbuf)); bcopy(&sumbuf[0], ahdat, (*algo->sumsiz)(sav)); - /* just in case */ - if (n) - m_free(n); return 0; fail: /* just in case */ ==== //depot/projects/wifi/sys/netinet6/esp_core.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/esp_core.c,v 1.22 2005/01/07 02:30:34 imp Exp $ */ +/* $FreeBSD: src/sys/netinet6/esp_core.c,v 1.23 2005/03/11 12:37:06 ume Exp $ */ /* $KAME: esp_core.c,v 1.50 2000/11/02 12:27:38 itojun Exp $ */ /*- @@ -75,7 +75,15 @@ #include <crypto/des/des.h> #include <crypto/blowfish/blowfish.h> -#include <crypto/cast128/cast128.h> + +#include <opencrypto/cast.h> +#define cast128_key cast_key +#define cast128_setkey(key, rawkey, keybytes) \ + cast_setkey((key), (rawkey), (keybytes)) +#define cast128_encrypt(key, inblock, outblock) \ + cast_encrypt((key), (inblock), (outblock)) +#define cast128_decrypt(key, inblock, outblock) \ + cast_decrypt((key), (inblock), (outblock)) #include <net/net_osdep.h> @@ -409,7 +417,7 @@ algo = esp_algorithm_lookup(sav->alg_enc); if (!algo) { ipseclog((LOG_ERR, - "esp_cbc_mature %s: unsupported algorithm.\n", algo->name)); + "esp_cbc_mature %d: unsupported algorithm.\n", sav->alg_enc)); return 1; } @@ -713,6 +721,7 @@ /* skip bodyoff */ while (soff < bodyoff) { + KASSERT(s != NULL, ("malformed mbuf chain")); if (soff + s->m_len >= bodyoff) { sn = bodyoff - soff; break; @@ -730,6 +739,7 @@ while (soff < m->m_pkthdr.len) { /* source */ + KASSERT(s != NULL, ("malformed mbuf chain")); if (sn + blocklen <= s->m_len) { /* body is continuous */ sp = mtod(s, u_int8_t *) + sn; @@ -923,6 +933,7 @@ /* skip bodyoff */ while (soff < bodyoff) { + KASSERT(s != NULL, ("malformed mbuf chain")); if (soff + s->m_len >= bodyoff) { sn = bodyoff - soff; break; @@ -940,6 +951,7 @@ while (soff < m->m_pkthdr.len) { /* source */ + KASSERT(s != NULL, ("malformed mbuf chain")); if (sn + blocklen <= s->m_len) { /* body is continuous */ sp = mtod(s, u_int8_t *) + sn;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503300524.j2U5OEQE005078>