A while ago, I corrected a bug in the command-line version of CMask that would cause it to crash if the input filename was longer than 32 characters. (Note that I did not provide a complete fix, but merely expanded the limit to 2048 characters and made the limit easier to change).
The following archives include the modified source code. The first one also includes binaries compiled for Mac OS X 10.5 or later (both PowerPC and Intel). They were compiled with GCC 4.0.1 and should be easy to recompile on many Unix-like operating systems. I have heard that the C++ code needs a few changes to compile with some more recent versions of GCC though.
For Mac OS X 10.5 or later
Downloads:
CMask source code and OS X binaries (124K)
CMask source code only (32K)