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 a930d6f..14265ee 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);
                }
        }