Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon From Rainer Weikusat <rwe...



details:   https://anonhg.NetBSD.org/src/rev/fd1d359cb079
branches:  trunk
changeset: 786039:fd1d359cb079
user:      tteras <tteras%NetBSD.org@localhost>
date:      Fri Apr 12 10:03:45 2013 +0000

description:
>From Rainer Weikusat <rweikusat%mobileactivedefense.com@localhost>: Do not send out
illegal zero length MODE_CFG attributes.

diffstat:

 crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 397d42437024 -r fd1d359cb079 crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
--- a/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c   Fri Apr 12 09:53:10 2013 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c   Fri Apr 12 10:03:45 2013 +0000
@@ -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.25 2013/04/12 10:03:45 tteras Exp $   */
 
 /* Id: isakmp_cfg.c,v 1.55 2006/08/22 18:17:17 manubsd Exp */
 
@@ -1000,6 +1000,9 @@
        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;



Home | Main Index | Thread Index | Old Index