pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56116: gethostbyname_r in net/GeoIP



>Number:         56116
>Category:       pkg
>Synopsis:       gethostbyname_r in net/GeoIP
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 18 21:15:00 +0000 2021
>Originator:     Stefan Schaeckeler
>Release:        pkgsrc-2021Q1
>Organization:
>Environment:
NetBSD xxx.xxx.xx 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Tue Mar  2 18:31:12 PST 2021  root%dxxx.xxx.xx@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
Calling geoiplookup on ip addresses works. Calling geoiplookup on dns names core dumps.

GeoIP calls gethostbyname_r and returns a bogus address:

1824                phe = gethostbyname_r(host, &phe2, buf, buflength, &herr);
(gdb) 
1840            if (!phe || result != 0) {
(gdb) p phe
$13 = (struct hostent *) 0xfffffffffff46010


See bug report #51477 for broader context. Isn't it time to properly address #51477?
>How-To-Repeat:

>Fix:
/usr/pkgsrc/net/GeoIP# cvs diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/GeoIP/Makefile,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile
--- Makefile    8 Jan 2020 11:59:43 -0000       1.32
+++ Makefile    18 Apr 2021 20:59:08 -0000
@@ -16,5 +16,7 @@ GNU_CONFIGURE=        yes
 
 TEST_TARGET=   check
 
+CONFIGURE_ARGS.NetBSD+=        ac_cv_func_gethostbyname_r=no
+
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"




Home | Main Index | Thread Index | Old Index