pkgsrc-Bugs archive

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

pkg/40465: www/analog: patch-ac is incomplete



>Number:         40465
>Category:       pkg
>Synopsis:       www/analog: patch-ac is incomplete
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 24 17:30:00 +0000 2009
>Originator:     Petar Bogdanovic
>Release:        NetBSD 4.0
>Organization:
>Environment:
        NetBSD starling.smokva.net 4.0 NetBSD 4.0 (STARLING) #0: Thu Jan 24
        14:30:56 UTC 2008  
root%starling.smokva.net@localhost:/tmp/netbsd/STARLING i386
>Description:
        The following scenario will make analog assign an empty string to the
        variable host in dnsresolve():

           $ dig +short PTR 99.5.159.67.in-addr.arpa.
           .

        This should not happen because it leads to invalid lines in the analog
        dnscache file:

           $ analog +V+D (...)
           analog: analog version 6.0/Unix
           analog: Warning G: Ignoring corrupt line in DNS file
             20546831 67.159.5.99 
             (For help on all errors and warnings, see docs/errors.html)
           D: Looking up 67.159.5.99:
           D:   resolved to 

        The problem will only occur on systems where the local stub-resolver
        drops the trailing dot from DNS query results. (Linux seems to leave
        the dot.)
>How-To-Repeat:
        Let analog parse lines generated by 67.159.5.99 or any other client
        with a similarly garbled RDNS mapping.
>Fix:
        ****************************************
        raw: http://smokva.net/patch/analog.diff
        ****************************************

diff -ru www/analog/Makefile local/analog/Makefile
--- www/analog/Makefile 2008-06-12 04:14:54.000000000 +0200
+++ local/analog/Makefile       2009-01-24 17:35:42.000000000 +0100
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.58 2008/06/12 02:14:54 joerg Exp $
 
 DISTNAME=      analog-6.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www
 MASTER_SITES=  ${HOMEPAGE} \
                http://www.web42.com/analog/ \
diff -ru www/analog/distinfo local/analog/distinfo
--- www/analog/distinfo 2007-10-19 17:55:57.000000000 +0200
+++ local/analog/distinfo       2009-01-24 17:39:28.000000000 +0100
@@ -5,4 +5,4 @@
 Size (analog-6.0.tar.gz) = 1553316 bytes
 SHA1 (patch-aa) = dc65dc097131572251f6e1490e3336c21ee53ee7
 SHA1 (patch-ab) = e59f91bedf08f4ece6b36ee06bc8d7d7742948c4
-SHA1 (patch-ac) = 9079c4f700637b06b092abe3204bb61b1df5b5ed
+SHA1 (patch-ac) = 389f46758838c353e38f68f44d24330bef473278
diff -ru www/analog/patches/patch-ac local/analog/patches/patch-ac
--- www/analog/patches/patch-ac 2007-10-19 05:51:51.000000000 +0200
+++ local/analog/patches/patch-ac       2009-01-24 17:37:23.000000000 +0100
@@ -56,7 +56,7 @@
 +      if (getaddrinfo(name, NULL, &hints, &res) == 0 && res != NULL) {
 +        if (res->ai_addr != NULL && res->ai_addrlen > 0 &&
 +          getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host),
-+                      NULL, 0, NI_NAMEREQD) == 0) {
++                      NULL, 0, NI_NAMEREQD) == 0 && host[0] != '\0') {
 +        strncpy(name, host, BLOCKSIZE - 1);
 +        name[BLOCKSIZE - 1] = '\0';
 +        done = TRUE;



Home | Main Index | Thread Index | Old Index