} else {
ptr += 2;
total -= 2;
- vendor = 0;
}
print_hex_data(ptr, attrlen, 3);
ssize_t len;
size_t my_room;
uint8_t *ptr = start;
- const VALUE_PAIR *old_vp;
const VALUE_PAIR *vp = *pvp;
const VALUE_PAIR *svp = vp;
-#ifndef NDEBUG
+ if (!svp) return 0;
+#ifndef NDEBUG
if (nest > fr_attr_max_tlv) {
fr_strerror_printf("vp2data_tlvs: attribute nesting overflow");
return -1;
while (vp) {
if (room < 2) return ptr - start;
- old_vp = vp;
ptr[0] = (vp->attribute >> fr_attr_shift[nest]) & fr_attr_mask[nest];
ptr[1] = 2;
fr_strerror_printf("ERROR: Cannot encode NULL TLV");
return -1;
}
- len = vp->length;
break;
default: /* unknown type: ignore it */