From: Alan T. DeKok Date: Fri, 27 May 2016 00:47:39 +0000 (-0400) Subject: use memchr on binary fields X-Git-Tag: release_3_0_12~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1877bdd0e6e9505ed210e30093bfdb1c1afeba6;p=thirdparty%2Ffreeradius-server.git use memchr on binary fields --- diff --git a/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c b/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c index ec54d9f422e..223456c0b97 100644 --- a/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c +++ b/src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c @@ -650,7 +650,7 @@ packet_ready: */ if (inst->with_ntdomain_hack && ((challenge = fr_pair_find_by_num(request->packet->vps, PW_USER_NAME, 0, TAG_ANY)) != NULL) && - ((username = strchr(challenge->vp_strvalue, '\\')) != NULL)) { + ((username = memchr(challenge->vp_octets, '\\', challenge->vp_length)) != NULL)) { /* * Wipe out the NT domain. *