]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
terminate && check VP
authorAlan T. DeKok <aland@freeradius.org>
Wed, 19 Apr 2017 18:42:34 +0000 (14:42 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 19 Apr 2017 18:42:34 +0000 (14:42 -0400)
src/modules/rlm_eap/rlm_eap.c

index a930d6fa1e9934698668e8072043541ebf9a63e6..14265ee754b32a0fb530a3a5135c72c2ef46a2f1 100644 (file)
@@ -469,10 +469,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, REQUEST *re
                        new = talloc_array(vp, char, vp->vp_length + 1);
 
                        memcpy(new, old, vp->vp_length);
+                       new[vp->length] = '\0';
                        new[vp->length + 1] = '\0';
                        vp->vp_strvalue = new;
 
                        rad_const_free(old);
+                       VERIFY_VP(vp);
                }
        }