From 0faa40eae318ac15cb010250501bcf23f029415f Mon Sep 17 00:00:00 2001 From: arif-pragmasys Date: Wed, 23 Sep 2015 01:00:20 -0500 Subject: [PATCH] sshd.exe bug fix, freeing same buffer twice --- auth2-pubkey.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 2acb300..fe49785 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -307,9 +307,10 @@ userauth_pubkey(Authctxt *authctxt) auth2_record_userkey(authctxt, key); key = NULL; /* Don't free below */ } - #endif /* else #ifdef WIN32_FIXME. */ buffer_free(&b); free(sig); + #endif /* else #ifdef WIN32_FIXME. */ + } else { debug("test whether pkalg/pkblob are acceptable"); packet_check_eom(); @@ -860,6 +861,7 @@ match_principals_command(struct passwd *user_pw, struct sshkey_cert *cert) * Checks whether key is allowed in authorized_keys-format file, * returns 1 if the key is allowed or 0 otherwise. */ + static int check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw) {