[getting old punched cards read]
It was thus said that the Great Greg Troutman once stated:
>
> Greg Troutman wrote:
>
> > Okay here is the source. Let me know if you have trouble compiling it.
>
> What a jerk! Oh well, no more requests for this please. Whew, at least
> it was only an 8K or so zip file, as opposed to say a modern Microsoft
> app ;)
Well, I snagged a copy of it, compiled it, found a bug, and fixed it.
Replace line 439
strcpy(filename,strtok(NULL,"+"));
to read:
{
char *p = strtok(NULL,"+");
if (p != NULL)
strcpy(filename,p);
else
filename[0] = '\0';
}
strcpy() (at least on my compiler) will crash if any of the parameters are
NULL pointers, and strtok() will return a NULL pointer if no more tokens
exist in the given string.
-spc (There may be other bugs lurking, but this one bit fairly easily ...)
Received on Fri Apr 24 1998 - 00:35:24 BST
This archive was generated by hypermail 2.3.0
: Fri Oct 10 2014 - 23:30:41 BST