bitcoin/bitcoin — pull request #1992 by Diapolo (2012-11-08 18:48:28+00:00)
Title: don't use memset() in privacy/security relevant code parts

As memset() can be optimized out by a compiler it should not be used in
privacy/security relevant code parts. OpenSSL provides the safe
OPENSSL_cleanse() function in crypto.h, which perfectly does the job of
clean and overwrite data.

For details see: http://www.viva64.com/en/b/0178/

- change memset() to OPENSSL_cleanse() where appropriate
- change a hard-coded number from netbase.cpp into a sizeof()

There are still some more memset() calls in the code, perhaps a dev should take a look if I missed any, that is related to this pull!