]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Initialise the random state in ssh_test_for_upstream().
authorSimon Tatham <anakin@pobox.com>
Sat, 24 Oct 2015 15:44:37 +0000 (16:44 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 24 Oct 2015 15:44:37 +0000 (16:44 +0100)
commit758ac4c206e35872a9c520356494f0f6c7477831
treedb2eed99d7b80124bbc0aca17663eb4d45d26685
parent48eafd66aa274c32fc8169a0d36619663905c210
Initialise the random state in ssh_test_for_upstream().

This protects the Unix platform sharing code in the case where no salt
file exists yet in the connection-sharing directory, in which case
make_dirname() will want to create one by using some random bytes, and
prior to this commit, would fail an assertion because the random
number generator wasn't set up.

It would be neater to just return FALSE from ssh_test_for_upstream in
that situation - if there's no salt file, then no sharing socket can
be valid anyway - but that would involve doing more violence to the
code structure than I'm currently prepared to do for a minor elegance
gain.
ssh.c