type.data is malloc'd by everyone BUT radeapclient, which
authoraland <aland>
Fri, 23 Feb 2007 10:06:48 +0000 (10:06 +0000)
committeraland <aland>
Fri, 23 Feb 2007 10:06:48 +0000 (10:06 +0000)
instead sets it to vp->strvalue.  Fix it.

src/modules/rlm_eap/libeap/eapcommon.c

index 97936dc..03223ef 100644 (file)
@@ -385,7 +385,8 @@ void map_eap_types(RADIUS_PACKET *req)
                ep.id   = id;
                ep.type.type = eap_type;
                ep.type.length = vp->length;
-               ep.type.data = vp->strvalue;
+               ep.type.data = malloc(vp->length);
+               memcpy(ep.type.data,vp->strvalue, vp->length);
                eap_basic_compose(req, &ep);
        }
 }