HTAnchor bug

HTAnchor.c bug...

I've found a bug in HTAnchor.c 

function: HTAnchor_findAddress()

This loop skips the first object in a list and leads to segmentation fault.

while ((foundAnchor = (HTParentAnchor *) HTList_nextObject(grownups)))
{
...
}

Should be 

    HTTRACE(ANCH_TRACE, "Anchor...... grownups count = %d\n" _
HTList_count(grownups));
    foundAnchor = grownups; 
    while (foundAnchor)  {
        if (!strcmp(foundAnchor->address, newaddr)) {
		HTTRACE(ANCH_TRACE, "Find Parent. %p with address `%s' already exists.\n" _ 
			    (void*) foundAnchor _ newaddr);
		HT_FREE(newaddr);		       /* We already have it */
		return (HTAnchor *) foundAnchor;
	}
        foundAnchor = (HTParentAnchor *) HTList_nextObject(grownups);
    }


____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=1

Received on Wednesday, 3 March 1999 17:27:39 UTC