From: Ian Jackson Date: Sat, 18 Aug 2018 21:29:33 +0000 (+0100) Subject: adns: Use proper variable for aftry array size calculation X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=commitdiff_plain;h=c548230f70ca5327e1aafb32099b0d6ae410e97e;hp=bcf2f343c795c4968feace1f434be253d4661054 adns: Use proper variable for aftry array size calculation GCC spots this bug, causing the build to fail with a warning. Closes:#891544. The effect is that for reverse lookups only IPv4 would work. IPv6 should work now. Signed-off-by: Ian Jackson --- diff --git a/adns/adns.c b/adns/adns.c index 7dde69c..d0ee295 100644 --- a/adns/adns.c +++ b/adns/adns.c @@ -494,7 +494,7 @@ static int query_submit(Tcl_Interp *ip, if (op.reverseany || (op.sflags & oisf_reverse)) { const int *af; - for (af=aftry; af < af + sizeof(af)/sizeof(*af); af++) { + for (af=aftry; af < af + sizeof(aftry)/sizeof(*aftry); af++) { memset(&sa,0,sizeof(sa)); sa.sa_family= *af; r= inet_pton(*af,domain,&sa); diff --git a/debian/changelog b/debian/changelog index 81af378..c859f29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ chiark-tcl (1.2.2~) unstable; urgency=medium + adns: + * Fix IPv6 PTR (reverse) lookups, and compilation with GCC-8. + Closes:#891544. + tcmdifgen: * Turn on warnings and `use strict' and fix everything. * Replace deprecated `use IO;' with `use IO::File'.