]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
TLV memory should be zerod in DHCP suboption encoder
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 Sep 2014 12:07:21 +0000 (08:07 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 Sep 2014 12:07:21 +0000 (08:07 -0400)
src/modules/proto_dhcp/dhcp.c

index a5880b743e87f5279fafd4772fd7474b58574547..ee567247d7ba32ccb218ac41c58d2b0a9711db40 100644 (file)
@@ -1320,7 +1320,7 @@ static VALUE_PAIR *fr_dhcp_vp2suboption(TALLOC_CTX *ctx, vp_cursor_t *cursor)
                tlv->length += vp->length;
        }
 
-       tlv->vp_tlv = talloc_array(tlv, uint8_t, tlv->length);
+       tlv->vp_tlv = talloc_zero_array(tlv, uint8_t, tlv->length);
        if (!tlv->vp_tlv) {
                talloc_free(tlv);
                return NULL;