🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: demon.ip.developers
2 messages
2 total messages Started by Niel Kempson Sun, 12 Nov 1995 00:00
KA9Q bug in domain.c
#1406
Author: Niel Kempson
Date: Sun, 12 Nov 1995 00:00
54 lines
1898 bytes
I've just tracked down a bug in KA9Q.

Symptoms:

    Try to list the dns cache with the command:

        domain cache list

    At this point, the OS/2 version of KA9Q crashes with a SYS3175 access
    violation.

Explanation:

    The docachelist() function in domain.c calls newsession() to create a
    separate "session window" to display the cache listing. 

        static int docachelist(int argc, char *argv[], void *p)
        {
            struct rr *rrp;
            struct session *sp;
            int row;
        
            if((sp = newsession(argv[1],DCLIST)) == NULLSESSION)
            {
                return -1;
            }

    The "dns cache list" command takes no further parameters, so only
    argv[0] is defined - argv[1] is undefined/NULL.

Fix:

    Pass argv[0] to newsession() instead:

        static int docachelist(int argc, char *argv[], void *p)
        {
            struct rr *rrp;
            struct session *sp;
            int row;
        
            if((sp = newsession(argv[0],DCLIST)) == NULLSESSION)
            {
                return -1;
            }

This bug hasn't yet crashed the DOS implementation of KA9Q 2.16d in a DOS
session on my machine, but we know that DOS is quite happy to let
programs read NULL pointers.
 
Niel
-- 
Dr C Niel Kempson
Snowy Owl Systems Limited
E-mail: kempson@snowyowl.co.uk (Internet)
Re: KA9Q bug in domain.c
#1407
Author: Malcolm Muir
Date: Sun, 12 Nov 1995 00:00
17 lines
995 bytes
Niel Kempson (kempson@snowyowl.co.uk) wrote:
> I've just tracked down a bug in KA9Q.

Noted and filed for fixing. Thanks.

> This bug hasn't yet crashed the DOS implementation of KA9Q 2.16d in a DOS
> session on my machine, but we know that DOS is quite happy to let
> programs read NULL pointers.

And we all know the DOS version does some odd things at times :)
Occasionally runnning under Windows or QEMM you get protection errors,
perhaps there is a connection :)

-- 
Malcolm S. Muir
Sunderland
England
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