[Prev][Next][Index][Thread]
HTHost.c (HTNet.c) 4.1b1 persistence, *NULL
-
To: LIBWWW bug reports <www-lib-bugs@w3.org>
-
Subject: HTHost.c (HTNet.c) 4.1b1 persistence, *NULL
-
From: Bill Rizzi <rizzi@softserv.com>
-
Date: Wed, 14 Aug 1996 18:10:58 -0700
-
From www-lib-bugs-request@www10.w3.org Wed Aug 14 21: 09:54 1996
-
Message-ID: <32127922.4C5F@softserv.com>
-
Organization: Software Services
-
X-List-URL: http://www.w3.org/pub/WWW/Archives/Public/www-lib-bugs/
-
X-Mailer: Mozilla 2.02Gold (WinNT; I)
-
X-URL: file:///D|/LeapFrog/w3c-libwww-4.1b1/Library/src/original/diffmail.txt
file:///D|/LeapFrog/w3c-libwww-4.1b1/Library/src/or
iginal/diffmail.txt
Z
--
Bill Rizzi rizzi@softserv.com
Software Services
Z http://www.softserv.com/~rizzi
Santa Barbara, CA
The HThost.c HTHost_setChannel() function can dereference a
NULL pointer and cause a segmentation fault. This happens when called
with a non-NULL host pointer and a NULL channel pointer.
The HTHost.c diff below fixes that problem. The HTNet.c diff
merely gives a better idea of the actual persistence status when
tracing.
libwww 41.b1 on Solaris 2.x : -D_REENTRANT
running MiniServ (webd), testing with www (also lynx, Netscape)
HTNet.c
782,783c782,783
< BOOL success;
<
---
> if (CORE_TRACE) HTTrace("Net......... Persistent connection set %s\n",
> persistent ? "ON" : "OFF");
785c785
< success = HTHost_setChannel(net->host, net->channel);
---
> HTHost_setChannel(net->host, net->channel);
787,793c787
< success = HTHost_clearChannel(net->host);
<
< if (CORE_TRACE) HTTrace("Net......... Persistent connection set %s %s\n",
< persistent ? "ON" : "OFF",
< success ? "succeeded" : "failed");
<
< return success;
---
> HTHost_clearChannel(net->host);
HThost.c
248a249
> #if 0
249a251,253
> #else
> if (!host) return NO;
> #endif
252a257
> #if 0
253a259,261
> #else
> } else if (channel) {
> #endif
Follow-Ups: