]> PatchyGit - patchyircd.git/commitdiff
fix WHOIS crash
authorEgor <egor@patchysicp.xyz>
Thu, 12 May 2022 18:13:34 +0000 (21:13 +0300)
committerEgor <egor@patchysicp.xyz>
Thu, 12 May 2022 18:13:34 +0000 (21:13 +0300)
irc.c

diff --git a/irc.c b/irc.c
index b86e7a9..24abcc0 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -895,7 +895,7 @@ int processPacket(struct client_data *client, char *source, char *command, int a
                if (cl) {
 #ifdef HAS_TLS
                        if (client == cl || client->umode & UMODE_OPER)
-                               if (client->cctx && tls_peer_cert_provided(client->cctx))
+                               if (client->cctx && tls_peer_cert_provided(cl->cctx))
                                        rpl_whoiscertfp(client, cl, tls_peer_cert_hash(cl->cctx)), sendbuf(client);
 #endif
                        if (cl->umode & UMODE_REGISTERED && !strcmp(cl->key, cl->username))