Initialize zero before using it in unwrap_des().

Heimdal since fc702a97f5 (August 2009)
can't process DES wrap tokens unless the stack garbage in the zero
array happens to be all zeros.

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
This commit is contained in:
ghudson@MIT.EDU
2011-06-13 21:11:31 -04:00
committed by Love Hörnquist Åstrand
parent 9c040227a5
commit 3c725a465e

View File

@@ -98,6 +98,7 @@ unwrap_des
if(cstate) {
/* decrypt data */
memcpy (&deskey, key->keyvalue.data, sizeof(deskey));
memset (&zero, 0, sizeof(zero));
for (i = 0; i < sizeof(deskey); ++i)
deskey[i] ^= 0xf0;