Date: Fri, 16 Mar 2018 09:46:53 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 226575] drill -x 192..168.5.25 (two dots in the row) breaks Message-ID: <bug-226575-8-EuVYVXzlQL@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-226575-8@https.bugs.freebsd.org/bugzilla/> References: <bug-226575-8@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226575 Maxim Konovalov <maxim@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maxim@FreeBSD.org --- Comment #1 from Maxim Konovalov <maxim@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.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226575-8-EuVYVXzlQL>
