diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2009-08-17 17:16:35 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2009-08-17 17:16:35 +0000 |
commit | d7db335df7367b96b094e8b886c161f4de11f525 (patch) | |
tree | e73b83133e55d71befc282adf0827090acdc4f0e /socket.c | |
parent | 7ba08582a30fab03ccf6ac78232d6bbd1be55cd0 (diff) | |
download | fetchmail-d7db335df7367b96b094e8b886c161f4de11f525.tar.gz fetchmail-d7db335df7367b96b094e8b886c161f4de11f525.tar.bz2 fetchmail-d7db335df7367b96b094e8b886c161f4de11f525.zip |
Fix free() of unallocated memory on intact/non-verbose SSL-connections.
Problem was improper scoping of xfree(tt). Patch courtesy of Thomas Heinz.
Fixes Gentoo bug #280760.
svn path=/branches/BRANCH_6-3/; revision=5415
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -628,9 +628,10 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) report(stdout, GT_("Unknown Issuer CommonName\n")); } if ((i = X509_NAME_get_text_by_NID(subj, NID_commonName, buf, sizeof(buf))) != -1) { - if (outlevel >= O_VERBOSE) + if (outlevel >= O_VERBOSE) { report(stdout, GT_("Server CommonName: %s\n"), (tt = sdump(buf, i))); - xfree(tt); + xfree(tt); + } if ((size_t)i >= sizeof(buf) - 1) { /* Possible truncation. In this case, this is a DNS name, so this * is really bad. We do not tolerate this even in the non-strict case. */ |