1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Unix static GSSAPI: fix an uninitialised structure field.

When linking statically against Kerberos, the setup code in
ssh_got_ssh_version() was trying to look up want_id==0 in the list of
one GSSAPI library, but unfortunately, the id field of that record was
not initialised at all, so if it happened to be nonzero nonsense, the
loop wouldn't find a library at all and would fail an assertion.
This commit is contained in:
Simon Tatham 2022-09-17 07:09:29 +01:00
parent b0a61849ef
commit 374107eb1e

View File

@ -140,6 +140,7 @@ struct ssh_gss_liblist *ssh_gss_setup(Conf *conf)
list->libraries = snew(struct ssh_gss_library); list->libraries = snew(struct ssh_gss_library);
list->nlibraries = 1; list->nlibraries = 1;
list->libraries[0].id = 0;
list->libraries[0].gsslogmsg = "Using statically linked GSSAPI"; list->libraries[0].gsslogmsg = "Using statically linked GSSAPI";
#define BIND_GSS_FN(name) \ #define BIND_GSS_FN(name) \