John Gluck - 2009-01-01

Hi...

I found a couple of problems and fixed them.
I used Visual Studio 2008.
The fixes are small.

1 - If there are non-ASCII characters in a file, it could cause GC to crash. The fix silently strips non-ASCII characters and continues.

2 - If you specify a path for finding GC.cfg, it would cause a crash.
This was because config.c defined the following:

char        *gz_CfgFileName = "GC.cfg";

This buffer is strlen("GC.cfg") characters long.

the fix is:

char         gz_CfgFileBfr[MAX_PATH] = "GC.cfg";
char        *gz_CfgFileName = gz_CfgFileBfr;

also an strcpy is changed to strncpy to avoid a buffer overflow.

I would like to submit the complete fixes. If interested please contact me at jgluckca@yahoo.ca and use a subject line like "GC fixes" or something similar so I won't think its spam :-)