Skip to content

Commit

Permalink
Do not use uninitialized cipher, reported by Gaetan Bisson.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Jan 24, 2018
1 parent 3389b51 commit d2ad749
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions child-fetch.c
Expand Up @@ -514,7 +514,7 @@ account_get_method(struct account *a)
{
struct fetch_imap_data *idata;
struct fetch_pop3_data *pdata;
const SSL_CIPHER *cipher;
const SSL_CIPHER *cipher = NULL;
static char s[128];
char tmp[128];

Expand All @@ -526,8 +526,7 @@ account_get_method(struct account *a)
pdata = a->data;
if (pdata->io->ssl != NULL)
cipher = SSL_get_current_cipher(pdata->io->ssl);
} else
cipher = NULL;
}
if (cipher != NULL) {
snprintf(tmp, sizeof tmp, "version=%s %s %d bits",
SSL_CIPHER_get_version(cipher),
Expand Down

0 comments on commit d2ad749

Please sign in to comment.