diff options
author | Simon Rettberg | 2018-05-18 13:42:07 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-05-18 13:42:07 +0200 |
commit | 38b804157124cad1fb7d936205216b212a0e3935 (patch) | |
tree | 3765ee1c315fd83af6d95e54a5720177eccf641b | |
parent | 4s timeout when connecting to server; send error to client on failure (diff) | |
download | ldadp-38b804157124cad1fb7d936205216b212a0e3935.tar.gz ldadp-38b804157124cad1fb7d936205216b212a0e3935.tar.xz ldadp-38b804157124cad1fb7d936205216b212a0e3935.zip |
Fix use after free
-rw-r--r-- | openssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -151,8 +151,8 @@ BOOL ssl_checkCertificateHash(epoll_server_t *server) if (server->serverData->fingerprint[i] != 0) { unsigned char md[EVP_MAX_MD_SIZE]; unsigned int n = 20; - X509_free(cert); X509_digest(cert, sha1, md, &n); + X509_free(cert); return n == 20 && memcmp(md, server->serverData->fingerprint, n) == 0; } } |