Fixed valgrind complaint due to BN_consttime_swap reading uninitialised data.
authorMatt Caswell <matt@openssl.org>
Thu, 10 Jul 2014 22:47:31 +0000 (23:47 +0100)
committerMatt Caswell <matt@openssl.org>
Sun, 13 Jul 2014 21:25:53 +0000 (22:25 +0100)
commit5a0df377ac4f0b54446b2bee1099ecf3624c2b8a
treeaf87dffca1cd74d0f9560b24bbf194d11c482750
parentf7123634a5f1a63a79d335ae015e9ab540a2fca2
Fixed valgrind complaint due to BN_consttime_swap reading uninitialised data.
This is actually ok for this function, but initialised to zero anyway if
PURIFY defined.

This does have the impact of masking any *real* unitialised data reads in bn though.

Patch based on approach suggested by Rich Salz.

PR#3415

(cherry picked from commit 77747e2d9a5573b1dbc15e247ce18c03374c760c)
crypto/bn/bn_lib.c