Thread View: demon.ip.developers
1 messages
1 total messages
Started by Niel Kempson
Sat, 11 Nov 1995 00:00
Another KA9Q bug in nntpcli.c
Author: Niel Kempson
Date: Sat, 11 Nov 1995 00:00
Date: Sat, 11 Nov 1995 00:00
56 lines
2287 bytes
2287 bytes
I've just tracked down another bug in KA9Q's nntpcli.c module.
Symptoms:
Set up an NNTP server:
nntp addserver news.demon.co.uk 300
When the nntp session has been established (headers or articles being
downloaded), drop the server:
nntp dropserver news.demon.co.uk
At this point, the OS/2 version of KA9Q crashes with a SYS3175 access
violation inside the strlen() run time library function. These
protected mode operating systems double up as useful, ever active
array bound/null pointer checkers :-)
Explanation:
Somewhere, strlen() is being called with a NULL pointer, but I didn't
have enough time to find out where :-(
Fix:
Make a small change to the dodrops() function in nntpcli.c to check
whether a server session is active before trying to drop it.
for (np = Nntpservers; np != NULLNNTP; npprev = np, np = np->next)
{
if (stricmp (np->name, argv[1]) == 0)
{
/* Start of change */
/*
** We must not drop a server if it has an active session in
** progress. Doing so causes an access violation.
*/
if (!run_timer (&np->nntpcli_t))
{
tprintf("unable to drop server, nntp session active\n");
return 0;
}
/* End of change */
stop_timer (&np->nntpcli_t);
I'm sure I saw a similar report and fix in the last month or so, but I
tried winding back demon.ip.developers to 1 September to find a relevant
message. No joy. Sorry if this is a duplicate.
Niel
--
Dr C Niel Kempson
Snowy Owl Systems Limited
E-mail: kempson@snowyowl.co.uk (Internet)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads