I try to encrypt a 4Gb file, and mcrypt crashes with a segmentation fault.
What can be the problem?
Can mcrypt handle any file size (as long as there is enough hard disk memory)?
Or it is limited by the amount of free RAM?
Is there a way to tell mcrypt to use disk memory rather than RAM, even if it is slower?
System: OSX 10.10
File system: Mac OS Extended
$ mcrypt --version
Mcrypt v.0.9.9 (i386-apple-darwin14.0.0)
Linked against libmcrypt v.2.5.8
Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)
$ mcrypt myfile.tgz
Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase:
Enter passphrase:
Signal 11 caught. Exiting.
The problem is that there are many malloc() calls in the code but there is no check about their return code :-( With big files it is easy to trigger out of memory conditions that cause segfaults.