Module Name: src Committed By: tteras Date: Fri Apr 12 10:04:22 UTC 2013
Modified Files: src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_8-branch]: isakmp_cfg.c Log Message: >From Rainer Weikusat <rweiku...@mobileactivedefense.com>: Do not send out illegal zero length MODE_CFG attributes. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.4.1 \ src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c:1.24 src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c:1.24.4.1 --- src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c:1.24 Tue Sep 21 13:14:17 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c Fri Apr 12 10:04:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp_cfg.c,v 1.24 2010/09/21 13:14:17 vanhu Exp $ */ +/* $NetBSD: isakmp_cfg.c,v 1.24.4.1 2013/04/12 10:04:21 tteras Exp $ */ /* Id: isakmp_cfg.c,v 1.55 2006/08/22 18:17:17 manubsd Exp */ @@ -1000,6 +1000,9 @@ isakmp_cfg_varlen(iph1, attr, string, le struct isakmp_data *new; char *data; + if (!len) + return NULL; + if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) { plog(LLV_ERROR, LOCATION, NULL, "Cannot allocate memory\n"); return NULL;