From c548230f70ca5327e1aafb32099b0d6ae410e97e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 18 Aug 2018 22:29:33 +0100 Subject: [PATCH 1/1] 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 --- adns/adns.c | 2 +- debian/changelog | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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'. -- 2.30.2