Skip to content

Commit 5980282

Browse files
committed
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: cryptodotis/irssi-otr#21
1 parent 50f3625 commit 5980282

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From dc5f05eb934ebd285e01febb9a4018512db702b1 Mon Sep 17 00:00:00 2001
2+
From: David Goulet <[email protected]>
3+
Date: Sat, 19 Jan 2013 15:53:23 -0500
4+
Subject: [PATCH] Fix: pass opdata when sending message fragment
5+
6+
The inject_message callback was missing the opdata when sending message
7+
fragments.
8+
9+
Signed-off-by: David Goulet <[email protected]>
10+
---
11+
src/message.c | 2 +-
12+
1 file changed, 1 insertion(+), 1 deletion(-)
13+
14+
diff --git a/src/message.c b/src/message.c
15+
index 7c39529..aa71df2 100644
16+
--- a/src/message.c
17+
+++ b/src/message.c
18+
@@ -441,7 +441,7 @@ fragment:
19+
/* Fragment and send according to policy */
20+
if (!err && messagep && *messagep) {
21+
if (context) {
22+
- err = fragment_and_send(ops, NULL, context, *messagep,
23+
+ err = fragment_and_send(ops, opdata, context, *messagep,
24+
fragPolicy, messagep);
25+
}
26+
}
27+
--
28+
1.7.10.4
29+

pkgs/development/libraries/libotr/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
1111
sha256 = "3f911994409898e74527730745ef35ed75c352c695a1822a677a34b2cf0293b4";
1212
};
1313

14+
# Crashes without it, still not accepted upstream.
15+
# Discussed in https://github.com/cryptodotis/irssi-otr/issues/21
16+
patches = [ ./0001-Fix-pass-opdata-when-sending-message-fragment.patch ];
17+
1418
NIX_LDFLAGS = "-lssp";
1519

1620
propagatedBuildInputs = [ libgcrypt ];

0 commit comments

Comments
 (0)