X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Frlm_eap%2Ftypes%2Frlm_eap_md5%2Feap_md5.c;h=f87c8dee09850458d777cf95a07eae957557bd32;hb=6926f9d2260fbfb520cfef5cc7cbaa7a348e35cf;hp=2411d4b7ee3d7a9b17f3fa773c34d3f6e43e582b;hpb=d9acda4858a4a87a70db4356dac4c52e61cdf5d9;p=freeradius.git diff --git a/src/modules/rlm_eap/types/rlm_eap_md5/eap_md5.c b/src/modules/rlm_eap/types/rlm_eap_md5/eap_md5.c index 2411d4b..f87c8de 100644 --- a/src/modules/rlm_eap/types/rlm_eap_md5/eap_md5.c +++ b/src/modules/rlm_eap/types/rlm_eap_md5/eap_md5.c @@ -15,9 +15,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,2001 The FreeRADIUS server project + * Copyright 2000,2001,2006 The FreeRADIUS server project * Copyright 2001 hereUare Communications, Inc. */ @@ -35,6 +35,9 @@ * */ +#include +RCSID("$Id$") + #include #include #include "eap.h" @@ -184,7 +187,7 @@ int eapmd5_verify(MD5_PACKET *packet, VALUE_PAIR* password, */ *ptr++ = packet->id; len++; - memcpy(ptr, password->strvalue, password->length); + memcpy(ptr, password->vp_strvalue, password->length); ptr += password->length; len += password->length; @@ -194,7 +197,7 @@ int eapmd5_verify(MD5_PACKET *packet, VALUE_PAIR* password, memcpy(ptr, challenge, MD5_CHALLENGE_LEN); len += MD5_CHALLENGE_LEN; - librad_md5_calc((u_char *)output, (u_char *)string, len); + fr_md5_calc((u_char *)output, (u_char *)string, len); /* * The length of the response is always 16 for MD5. @@ -222,10 +225,10 @@ int eapmd5_compose(EAP_DS *eap_ds, MD5_PACKET *reply) eap_ds->request->type.type = PW_EAP_MD5; rad_assert(reply->length > 0); - rad_assert(reply->value_size < 256); eap_ds->request->type.data = malloc(reply->length); if (eap_ds->request->type.data == NULL) { + eapmd5_free(&reply); radlog(L_ERR, "rlm_eap_md5: out of memory"); return 0; }