> On version 2, I get "encryptor has stopped responding, do you want to close the window".
Well the first big mistake is this.

> folderPath = realloc(folderPath, pathLength + 2);
folderPath wasn't the result of a previous malloc/realloc call (or NULL), so you just trashed everything.

> char *commandBuffer = malloc(pathLength + 30);
This just doesn't seem enough, given the fixed length string and the two string parameters.


Was it your professor's idea to use goto in your other program?

> // Transfer the file name into f1 to avoid "Can't open inFile"
This is a voodoo comment.
Cargo cult programming - Wikipedia