* bugfix #1209: make install ldns.pc file
Thanks Oleksandr Natalenko
* removed duplicate condition in ldns_udp_send_query.
+ * ldns_wire2pkt: fix null pointer dereference if pkt allocation fails
+ and fix memory leak with more EDNS sections
+ Thanks Jan Vcelak
1.7.0 2016-12-20
* Fix lookup of relative names in ldns_resolver_search.
uint8_t data[4];
+ if (!packet) {
+ return LDNS_STATUS_MEM_ERR;
+ }
+
status = ldns_wire2pkt_hdr(packet, wire, max, &pos);
LDNS_STATUS_CHECK_GOTO(status, status_error);
ldns_pkt_set_edns_z(packet, ldns_read_uint16(&data[2]));
/* edns might not have rdfs */
if (ldns_rr_rdf(rr, 0)) {
+ ldns_rdf_deep_free(ldns_pkt_edns_data(packet));
ldns_pkt_set_edns_data(packet, ldns_rdf_clone(ldns_rr_rdf(rr, 0)));
}
ldns_rr_free(rr);