[Bug 226575] drill -x 192..168.5.25 (two dots in the row) breaks
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Mar 16 09:46:54 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226575
Maxim Konovalov <maxim at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maxim at FreeBSD.org
--- Comment #1 from Maxim Konovalov <maxim at FreeBSD.org> ---
Hello,
I must admit that now I need to visit a doctor to check my eyes after reading
drill.c.
Here is a rather simple and admittedly naive and incomplete band-aid:
Index: drill.c
===================================================================
--- drill.c (revision 325887)
+++ drill.c (working copy)
@@ -695,6 +695,7 @@ main(int argc, char *argv[])
break;
case DRILL_REVERSE:
/* ipv4 or ipv6 addr? */
+printf("name %s\n", name);
if (strchr(name, ':')) {
if (strchr(name, '.')) {
error("Syntax error: both '.' and ':'
seen in address\n");
@@ -747,6 +748,9 @@ main(int argc, char *argv[])
free(name2);
} else {
qname = ldns_dname_new_frm_str(name);
+ if (!qname) {
+ error("%s", "-x implies an ip
address");
+ }
qname_tmp = ldns_dname_reverse(qname);
ldns_rdf_deep_free(qname);
qname = qname_tmp;
%%%
I see a number of other equally suspicious places but unfortunately cannot
invest more time into.
Sorry for that.
Maxim
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list