Module Name: src
Committed By: bouyer
Date: Sun Sep 12 21:16:46 UTC 2010
Modified Files:
src/sys/netinet6 [netbsd-4]: esp_aesctr.c esp_core.c
Log Message:
Pull up following revision(s) (requested by jym in ticket #1403):
sys/netinet6/esp_core.c: revision 1.46
sys/netinet6/esp_aesctr.c: revision 1.13
Fix some code paths where pointers are dereferenced after checking that
they are NULL (oops?)
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/netinet6/esp_aesctr.c
cvs rdiff -u -r1.38 -r1.38.2.1 src/sys/netinet6/esp_core.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet6/esp_aesctr.c
diff -u src/sys/netinet6/esp_aesctr.c:1.5 src/sys/netinet6/esp_aesctr.c:1.5.2.1
--- src/sys/netinet6/esp_aesctr.c:1.5 Thu Nov 16 01:33:45 2006
+++ src/sys/netinet6/esp_aesctr.c Sun Sep 12 21:16:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_aesctr.c,v 1.5 2006/11/16 01:33:45 christos Exp $ */
+/* $NetBSD: esp_aesctr.c,v 1.5.2.1 2010/09/12 21:16:46 bouyer Exp $ */
/* $KAME: esp_aesctr.c,v 1.2 2003/07/20 00:29:37 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_aesctr.c,v 1.5 2006/11/16 01:33:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_aesctr.c,v 1.5.2.1 2010/09/12 21:16:46 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -80,10 +80,10 @@
const struct esp_algorithm *algo;
algo = esp_algorithm_lookup(sav->alg_enc);
- if (!algo) {
+ if (algo == NULL) {
ipseclog((LOG_ERR,
- "esp_aeesctr_mature %s: unsupported algorithm.\n",
- algo->name));
+ "esp_aesctr_mature: unsupported encryption algorithm %d\n",
+ sav->alg_enc));
return 1;
}
Index: src/sys/netinet6/esp_core.c
diff -u src/sys/netinet6/esp_core.c:1.38 src/sys/netinet6/esp_core.c:1.38.2.1
--- src/sys/netinet6/esp_core.c:1.38 Thu Nov 16 01:33:45 2006
+++ src/sys/netinet6/esp_core.c Sun Sep 12 21:16:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: esp_core.c,v 1.38 2006/11/16 01:33:45 christos Exp $ */
+/* $NetBSD: esp_core.c,v 1.38.2.1 2010/09/12 21:16:46 bouyer Exp $ */
/* $KAME: esp_core.c,v 1.53 2001/11/27 09:47:30 sakane Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.38 2006/11/16 01:33:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_core.c,v 1.38.2.1 2010/09/12 21:16:46 bouyer Exp $");
#include "opt_inet.h"
@@ -409,9 +409,10 @@
}
algo = esp_algorithm_lookup(sav->alg_enc);
- if (!algo) {
+ if (algo == NULL) {
ipseclog((LOG_ERR,
- "esp_cbc_mature %s: unsupported algorithm.\n", algo->name));
+ "esp_cbc_mature: unsupported encryption algorithm %d\n",
+ sav->alg_enc));
return 1;
}