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:23:10 +0000 (22:23 +0100)
commit72370164c37d5384ee9788010a08b4feeba41688
tree71942e704dece4c79600dbb8a2a1a6f7c76c9d67
parent704422ce1ef964005db8ecfa239b9b04db67ff50
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