- From: Francois Nicot <fnicot@silicom.fr>
- Date: Mon, 04 Dec 2000 18:24:34 +0100
- To: "www-lib@w3.org" <www-lib@w3.org>
Hi all,
see below my comments on w3c-libwww-pre-5.3.0 HTCookie.c
1 Major bug
1 Minor bug
Major
***************************
memory leak
PRIVATE int HTCookie_afterFilter (HTRequest * request, HTResponse *
response,
void * param, int status)
char * host = HTParse(addr, "", PARSE_HOST); <---- host is allocated
if (CookieMode & HT_COOKIE_SAME_DOMAIN)
res = tailcasecomp(cookie_host, host);
else
res = strcasecomp(cookie_host, host);
host is never deallocated after its use!!
Minor
***********************************************
here, use of a Assoc Module macro (HTAssocList_nextObject) instead of
HTList_nextObject to handle a HTList* object.
It is a minor bug ,but it could be a major one if definitions of
HTAssocList or HTList would change.
PRIVATE int HTCookie_afterFilter (HTRequest * request, HTResponse *
response,
void * param, int status)
{
if ((CookieMode & HT_COOKIE_ACCEPT) && SetCookie) {
HTCookieHolder * holder = HTCookieHolder_find(request);
if (holder) {
HTList * cookies = holder->cookies;
HTCookie *
pres;
while ((pres = (HTCookie *)
HTAssocList_nextObject(cookies))) { <---- the problem is here
Bye.
--
Francois NICOT fnicot@silicom.fr
SILICOM Region Ouest 02 99 84 17 17
80, avenue des buttes de Coesmes
35700 RENNES
Received on Monday, 4 December 2000 12:19:33 UTC