🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by David Lai Thu, 26 May 1988 15:41
Re: shar2
#121
Author: David Lai
Date: Thu, 26 May 1988 15:41
23 lines
1184 bytes
In the recent posting of shar2, there is a minor bug which may cause
segmentation faults on some machines.  In the file shar2.c, in procedure
main, there is the statement:

while (argv[1][0] == '-')

is executed without checking to see if argc==1 (no args on the
command line), causing a dump.

The fix is to move the lines (which appear later in main):
    if (argc == 1)
    {
        fprintf (stderr, "%s: No input files\n", SHAR);
        helpuser ();
        exit (1);
    }

up to the top of main before while (argv[1][0] == '-')

-- 
	"What is a DJ if he can't scratch?"  - Uncle Jamms Army
The views expressed are those of the author, and not of Visual Edge, nor Usenet.
David Lai (vedge!lai@larry.mcrcim.mcgill.edu || ...watmath!onfcanim!vedge!lai)
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