[ldns-users] higher.c crash patch
Guus Zijlstra
guus.zijlstra at zinias.nl
Fri May 15 14:47:49 UTC 2015
A sloppy free crashes drill et al. on an invalid name in /etc/hosts.
Confirm with an /etc/hosts line like this:
127.0.0.1 foo .bar
The bug is fixed by the patch below.
Guus Zijlstra.
--- /tmp/ldns-1.6.13/higher.c 2011-08-29 16:02:00.000000000 +0200
+++ ldns-1.6.13/higher.c 2015-05-09 22:03:11.040811510 +0200
@@ -225,8 +225,8 @@
parse_result = ldns_rr_new_frm_str(&rr, rr_str, 0, NULL, NULL);
if (parse_result == LDNS_STATUS_OK && ldns_rr_owner(rr) && ldns_rr_rd_count(rr) > 0) {
ldns_rr_list_push_rr(list, ldns_rr_clone(rr));
+ ldns_rr_free(rr);
}
- ldns_rr_free(rr);
}
}
ldns_buffer_free(linebuf);
More information about the ldns-users
mailing list