I was just wondering if anyone knew about this issue. From what I understand, crypt() uses a statically allocated buffer to store it's output when doing encryption, and returns a pointer to that buffer, much like the readdir function. Now, the issue really is just that valgrind complains when I run a full memcheck with it after my program uses crypt. However, if I try to free the memory and crypt is called a seccond time I get a much worse error, that previously unallocated memory is being written to.
This isn't really a problem as far as I can see, my program runs fine, and linux is clever enough to clean up the 65 bytes that crypt never frees, but I would like to know if I'm missing a crypt-free() routine or something, or if this is simply a bug in valgrind.
Anyone have any ideas?
(P.S. I couldn't find much documentation on crypt-lib, there may be something I'm missing, although the functions work great!)
(P.P.S. I am using C++ on a linux system, and as far as I know I have the latest version of libcrypt. Yeah, you heard me, C++ Strike...