Make a _copy_ of the attributes when copying them.
authorLinus Nordberg <linus@nordberg.se>
Wed, 28 Aug 2013 11:48:49 +0000 (13:48 +0200)
committerLinus Nordberg <linus@nordberg.se>
Fri, 6 Sep 2013 13:16:27 +0000 (15:16 +0200)
Doh!

Closes RADSECPROXY-53.

ChangeLog
radmsg.c

index 0d9f9a5..46ee53f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Changes since 1.6.4
+       Bug fixes:
+       - Fix a crash bug introduced in 1.6.4. Fixes RADSECPROXY-53,
+       bugfix on 1.6.4.
+
 2013-09-05 1.6.4
        Bug fixes:
        - Keeping Proxy-State attributes in all replies to clients
index e422f90..6e33990 100644 (file)
--- a/radmsg.c
+++ b/radmsg.c
@@ -118,7 +118,7 @@ int radmsg_copy_attrs(struct radmsg *dst,
     int n = 0;
 
     for (node = list_first(list); node; node = list_next(node)) {
-        if (radmsg_add(dst, (struct tlv *) node->data) != 1) {
+        if (radmsg_add(dst, copytlv((struct tlv *) node->data)) != 1) {
             n = -n;
             break;
         }