size_t max;
const uint8_t* wire;
- if (!ldns_pkt_edns_data(packet))
+ if (!ldns_pkt_edns_data(packet)) {
return NULL;
+ }
/* return the list if it already exists */
if (packet->_edns_list != NULL) {
/* if the list doesn't exists, we create it by parsing the _edns_data */
+ assert(ldns_pkt_edns_data(packet));
max = ldns_rdf_size(ldns_pkt_edns_data(packet));
wire = ldns_rdf_data(ldns_pkt_edns_data(packet));
- // @TODO do checks so we don't read into un-auth memory (max !< 4)
edns_list = ldns_edns_option_list_new();
if (edns_list == NULL) {