Pull fix from branch_1_1
[freeradius.git] / src / modules / rlm_eap / libeap / eapcommon.c
index eea929c..d918f1a 100644 (file)
@@ -17,9 +17,9 @@
  *
  *   You should have received a copy of the GNU General Public License
  *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
- * Copyright 2000-2003  The FreeRADIUS server project
+ * Copyright 2000-2003,2006  The FreeRADIUS server project
  * Copyright 2001  hereUare Communications, Inc. <raghud@hereuare.com>
  * Copyright 2003  Alan DeKok <aland@freeradius.org>
  * Copyright 2003  Michael Richardson <mcr@sandelman.ottawa.on.ca>
  *
  */
 
+#include <freeradius-devel/ident.h>
+RCSID("$Id$")
+
 #include <freeradius-devel/autoconf.h>
 #include <freeradius-devel/missing.h>
 #include <freeradius-devel/libradius.h>
 #include "eap_types.h"
 
-static const char rcsid[] = "$Id$";
-
 static const char *eap_types[] = {
   "",
   "identity",
@@ -387,7 +388,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->vp_strvalue;
+               ep.type.data = malloc(vp->length);
+               memcpy(ep.type.data,vp->vp_octets, vp->length);
                eap_basic_compose(req, &ep);
        }
 }