summary refs log tree commit diff
path: root/pkgs/development/libraries/libotr
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2013-04-13 20:01:34 +0200
committerLluís Batlle i Rossell <viric@viric.name>2013-04-13 20:01:34 +0200
commit5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc (patch)
treeacbaa5676cfd697971f755370f824de2c25dfdac /pkgs/development/libraries/libotr
parent50f3625f7024b6115c531ea8a9b850ceeb6e4220 (diff)
downloadnixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.tar
nixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.tar.gz
nixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.tar.bz2
nixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.tar.lz
nixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.tar.xz
nixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.tar.zst
nixpkgs-5980282d1750efb3ad050b18e3d5aeb7e4ecb1cc.zip
Fixing libotr crash (taking a 3rd party patch)
I hope it doesn't make libotr insecure, but the trivial patch comes from
this irssi-otr thread:
https://github.com/cryptodotis/irssi-otr/issues/21
Diffstat (limited to 'pkgs/development/libraries/libotr')
-rw-r--r--pkgs/development/libraries/libotr/0001-Fix-pass-opdata-when-sending-message-fragment.patch29
-rw-r--r--pkgs/development/libraries/libotr/default.nix4
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libotr/0001-Fix-pass-opdata-when-sending-message-fragment.patch b/pkgs/development/libraries/libotr/0001-Fix-pass-opdata-when-sending-message-fragment.patch
new file mode 100644
index 00000000000..2b39d1fee9a
--- /dev/null
+++ b/pkgs/development/libraries/libotr/0001-Fix-pass-opdata-when-sending-message-fragment.patch
@@ -0,0 +1,29 @@
+From dc5f05eb934ebd285e01febb9a4018512db702b1 Mon Sep 17 00:00:00 2001
+From: David Goulet <dgoulet@ev0ke.net>
+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 <dgoulet@ev0ke.net>
+---
+ 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
+
diff --git a/pkgs/development/libraries/libotr/default.nix b/pkgs/development/libraries/libotr/default.nix
index 1b56414a96c..d737b8d9916 100644
--- a/pkgs/development/libraries/libotr/default.nix
+++ b/pkgs/development/libraries/libotr/default.nix
@@ -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 ];