Trouble with commandline CMask

It was recently brought to my attention by Judy Klein that the commandline version of CMask sometimes crashes depending on the commandline arguments that are provided. I tracked down the problem to a very small buffer size for the input and output filenames/pathnames. So if you are experiencing a "Segmentation fault" with CMask, it may be because you are specifying paths on the commandline that are longer than 32 characters.

The fix is to patch several lines in the CMask code and recompile. I hope to post a patched source code archive for CMask to my website soon, but if it is not there yet, try changing these lines yourself by replacing "32" or "33" with a larger number such as "2048":

In cmask.cpp, lines 34-35:

inname = new char [32];
outname = new char [32];

In fileio.cpp, lines 143-145:

char *dummy1, dummy2[32];

for (i=0; i<32; dummy2[i]='\0', i++);

In fileio.h, lines 16 & 39:

char filename[33];

char filename[33];

In parser.h, lines 73 & 96:

char filename[33];

char filename[33];

After you make the above changes, open a Terminal window and "cd" to the source directory. Then type "make" to recompile CMask.

And check my website for new versions of CMask in the future:

http://www.anthonykozar.net/ports/cmask.html

Thanks Anthony for figuring

Thanks Anthony for figuring this out! Jan Jacob and I were both having problems with CMask segfaulting. I'm going to point him to this blog entry. Thanks again!

Re: Thanks Anthony for figuring

Hey, great! I'm always glad to be of service :)

cheap generic viagra avanafil generic viagra Canadian pharmacy Canadian pharmacy viagra staxyn zpak kamagra uk viagra online generic cialis z-pak z-pack cialis online buy viagra uk buy zithromax pharmacy uk ed pills ed drugs cialis uk viagra uk z pack zpack z pak