Skip to content

Commit

Permalink
Fixing libotr crash (taking a 3rd party patch)
Browse files Browse the repository at this point in the history
I hope it doesn't make libotr insecure, but the trivial patch comes from
this irssi-otr thread:
cryptodotis/irssi-otr#21
  • Loading branch information
viric committed Apr 13, 2013
1 parent 50f3625 commit 5980282
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From dc5f05eb934ebd285e01febb9a4018512db702b1 Mon Sep 17 00:00:00 2001
From: David Goulet <[email protected]>
Date: Sat, 19 Jan 2013 15:53:23 -0500
Subject: [PATCH] Fix: pass opdata when sending message fragment

The inject_message callback was missing the opdata when sending message
fragments.

Signed-off-by: David Goulet <[email protected]>
---
src/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/message.c b/src/message.c
index 7c39529..aa71df2 100644
--- a/src/message.c
+++ b/src/message.c
@@ -441,7 +441,7 @@ fragment:
/* Fragment and send according to policy */
if (!err && messagep && *messagep) {
if (context) {
- err = fragment_and_send(ops, NULL, context, *messagep,
+ err = fragment_and_send(ops, opdata, context, *messagep,
fragPolicy, messagep);
}
}
--
1.7.10.4

4 changes: 4 additions & 0 deletions pkgs/development/libraries/libotr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
sha256 = "3f911994409898e74527730745ef35ed75c352c695a1822a677a34b2cf0293b4";
};

# Crashes without it, still not accepted upstream.
# Discussed in https://github.com/cryptodotis/irssi-otr/issues/21
patches = [ ./0001-Fix-pass-opdata-when-sending-message-fragment.patch ];

NIX_LDFLAGS = "-lssp";

propagatedBuildInputs = [ libgcrypt ];
Expand Down

0 comments on commit 5980282

Please sign in to comment.