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:20:15 +0000 (22:20 +0100)
commit14b5d0d029da51cb6874aa7d39d1253c43442ee2
tree2686bb93bec79adfba2027f14ae66ff4e9a30ddb
parent2fbd94252a119c064fc043da2b47a3510ee4b238
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