Found PL16 problem on Linux (UDP_HIT_OBJ) causing coredumps

From: Miguel A.L. Paraz <map@dont-contact.us>
Date: Wed, 12 Jun 1996 14:00:02 +0800 (GMT+0800)

Hi,
 
I found the problem with coredumps under Linux 1.2.13.
In neighbors.c, in function neighborsUdpAck :

    /* look up for neighbor/parent entry */
    e = whichEdge(header, from);

e == NULL. Now given the code:

    if (e) {

I assume that (e == NULL) is a possibility. But, it's still
dereferenced in the code below, with e->host :

        hierarchy_log_append(entry->url,
            HIER_UDP_HIT_OBJ,
            0,
            e->host);

Thus - is the logging code a problem, or should (e != NULL) in the first
place? My quick fix is to change this to:

        hierarchy_log_append(entry->url,
            HIER_UDP_HIT_OBJ,
            0,
            (!e ? "NULL" : e->host));

It looks like the problem is with UDP_HIT_OBJ objects...
Duane and company, is there a "Squid Hacker's Guide" to help
people who have to debug this stuff? Otherwise, I'm going to
slog through the code and write my own notes. ;)

-- 
miguel a.l. paraz <map@iphil.net>              (speaking for myself alone)
technical services manager, iphil communications, makati city, philippines
Received on Tue Jun 11 1996 - 23:01:16 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:32:30 MST