summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/libotr/src/message.c
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2016-03-10 18:50:25 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2016-03-10 18:50:25 +0000
commit233d4da0d94f0fddd54182426f5abef7eb2a25f7 (patch)
treee4f7ee131c74164e4f81851dfa56bf42f8ed1efd /plugins/MirOTR/libotr/src/message.c
parent556378c60ee53dd36c828976e51664b6d61736f0 (diff)
MirOTR: Updated lobotr to version 4.1.1 (fixes #1208)
-Fix an integer overflow bug that can cause a heap buffer overflow (and from there remote code execution) on 64-bit platforms -Fix possible free() of an uninitialized pointer -Be stricter about parsing v3 fragments -Add a testsuite ("make check" to run it), but only on Linux for now, since it uses Linux-specific features such as epoll -Fix a memory leak when reading a malformed instance tag file -Protocol documentation clarifications git-svn-id: http://svn.miranda-ng.org/main/trunk@16454 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/libotr/src/message.c')
-rw-r--r--plugins/MirOTR/libotr/src/message.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/MirOTR/libotr/src/message.c b/plugins/MirOTR/libotr/src/message.c
index b13710cccd..c44ce7b8fc 100644
--- a/plugins/MirOTR/libotr/src/message.c
+++ b/plugins/MirOTR/libotr/src/message.c
@@ -1,6 +1,6 @@
/*
* Off-the-Record Messaging library
- * Copyright (C) 2004-2014 Ian Goldberg, David Goulet, Rob Smits,
+ * Copyright (C) 2004-2015 Ian Goldberg, David Goulet, Rob Smits,
* Chris Alexander, Willy Lew, Lisa Du,
* Nikita Borisov
* <otr@cypherpunks.ca>
@@ -467,10 +467,9 @@ static gcry_error_t send_or_error_auth(const OtrlMessageAppOps *ops,
if (!err) {
const char *msg = context->auth.lastauthmsg;
if (msg && *msg) {
- time_t now;
fragment_and_send(ops, opdata, context, msg,
OTRL_FRAGMENT_SEND_ALL, NULL);
- now = time(NULL);
+ time_t now = time(NULL);
/* Update the "last sent" fields, unless this is a version 3
* message typing to update the master context (as happens
* when sending a v3 COMMIT message, for example). */
@@ -1506,7 +1505,7 @@ int otrl_message_receiving(OtrlUserState us, const OtrlMessageAppOps *ops,
unsigned char* nextmsg;
int nextmsglen;
OtrlTLV *sendtlv;
- char *sendsmp;
+ char *sendsmp = NULL;
otrl_sm_step3(context->smstate, tlv->data,
tlv->len, &nextmsg, &nextmsglen);
@@ -1561,7 +1560,7 @@ int otrl_message_receiving(OtrlUserState us, const OtrlMessageAppOps *ops,
unsigned char* nextmsg;
int nextmsglen;
OtrlTLV *sendtlv;
- char *sendsmp;
+ char *sendsmp = NULL;
err = otrl_sm_step4(context->smstate, tlv->data,
tlv->len, &nextmsg, &nextmsglen);
/* Set trust level based on result */