Mailing List Archive

Easy patch for constification
Patch attached add many const specifier on ciphers. Constification can
improve performance cause it add some informations to compiler and also
can save you in case of corruption of memory transforming some potential
buffer overflows to DoS.

Some questions about code:
- why are selftests always compiled in ? IMHO is better to make tests
before installing and remove them from final installed code
- gcry_cipher_spec contains a lot of not constant fields. Is this
expected or just for back compatibility? Is expected that for instance
someone can change aliases or oids ?
- module deallocation (like ciphers_registered) is not handled. This can
be a problem in environment where libgcrypt is loaded and unloaded
dynamically leading to memory leaks

Regards,
Frediano Ziglio
Re: Easy patch for constification [ In reply to ]
On Thu, 22 Dec 2005, ZIGLIO, Frediano, VF-IT wrote:

> - module deallocation (like ciphers_registered) is not handled. This can
> be a problem in environment where libgcrypt is loaded and unloaded
> dynamically leading to memory leaks

There is a patch for this and related problems, but it will not be applied
by GCRYPT maintainers for very strange reasons. You can find it e.g. in my
last mail to this list and soon on a special webpage.

Ciao
--
http://www.dstoecker.de/ (PGP key available)

_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel