heimdal: Fix CID 240793 Uninitialized scalar variable
commit4ae2266015e06dee5cd262d87b4895a73396b6b7
authorVolker Lendecke <vl@samba.org>
Sun, 3 May 2015 09:29:51 +0000 (3 09:29 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 7 May 2015 18:20:19 +0000 (7 20:20 +0200)
tree093f0b1896c16525e1a5d201e5755f31f5f60ffd
parent3876e59826ad17466975ae9e9a65879c76737b2b
heimdal: Fix CID 240793 Uninitialized scalar variable

tmp.data is uninitialized in the fwrite call

Hopefully I don't create a problem here: If tmp.data is supposed to be randomly
set, I think the right fix would have been to explicitly call a random function
initializing it.

<jra@samba.org>
------------------------------------------------------------
I have looked through the code carefully. Your fix is safe.

The first entry in the replay file created in krb5_rc_initialize()
is only used to store the 'krb5_deltat auth_lifespan' value, the
associated data[16] value is never looked at. (Look at the
code in krb5_rc_store() and krb5_rc_get_lifespan() to confirm).

Only subsequent data[16] values are checked with memcmp.
------------------------------------------------------------

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/heimdal/lib/krb5/replay.c