[Pkg-privacy-commits] [irssi-plugin-otr] 124/267: Fix: Segfault when trusting on a finished state

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:41:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.

commit c15f817284e1621704186ed464c40f4dab003aae
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Mon Nov 12 17:28:47 2012 -0500

    Fix: Segfault when trusting on a finished state
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/otr.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/otr.c b/src/otr.c
index de4b61a..886aa6c 100644
--- a/src/otr.c
+++ b/src/otr.c
@@ -406,6 +406,7 @@ void otr_trust(SERVER_REC *irssi, char *nick, const char *peername)
 	char *accname = NULL;
 	char nickbuf[128];
 	char peerfp[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
+	struct otr_peer_context *opc;
 
 	if (peername) {
 		nick = nickbuf;
@@ -425,10 +426,13 @@ void otr_trust(SERVER_REC *irssi, char *nick, const char *peername)
 		goto end;
 	}
 
-	otrl_context_set_trust(ctx->active_fingerprint, "manual");
+	opc = ctx->app_data;
+	assert(opc);
+
+	otrl_context_set_trust(opc->active_fingerprint, "manual");
 	otr_status_change(irssi, nick, OTR_STATUS_TRUST_MANUAL);
 
-	otrl_privkey_hash_to_human(peerfp, ctx->active_fingerprint->fingerprint);
+	otrl_privkey_hash_to_human(peerfp, opc->active_fingerprint->fingerprint);
 
 	IRSSI_NOTICE(irssi, nick, "%9OTR%9: Trusting fingerprint from %9%s%9:\n"
 			"%9OTR%9: %g%s%n", nick, peerfp);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git



More information about the Pkg-privacy-commits mailing list