Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-09-17 09:09:29 +0300
committerSimon Tatham <anakin@pobox.com>2022-09-17 09:55:05 +0300
commit374107eb1e2ae576c10cdd538f45f18918df8c4b (patch)
tree5d35eccde71fb67509a5a1b6be5bb1672fed7990
parentb0a61849efb3cbf0f1c0fead0f422341a969458c (diff)
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.
-rw-r--r--unix/gss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/gss.c b/unix/gss.c
index cd9971c7..bd599fcc 100644
--- a/unix/gss.c
+++ b/unix/gss.c
@@ -140,6 +140,7 @@ struct ssh_gss_liblist *ssh_gss_setup(Conf *conf)
list->libraries = snew(struct ssh_gss_library);
list->nlibraries = 1;
+ list->libraries[0].id = 0;
list->libraries[0].gsslogmsg = "Using statically linked GSSAPI";
#define BIND_GSS_FN(name) \