[Pkg-privacy-commits] [libotr] 64/225: Fix a potential, but unlikely, NULL pointer dereference
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:44:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository libotr.
commit d1c4a8114da085c3e4d0d86d8bda71a1f7b75f16
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date: Thu May 3 18:27:02 2012 -0400
Fix a potential, but unlikely, NULL pointer dereference
---
src/message.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/message.c b/src/message.c
index c929583..d76f559 100644
--- a/src/message.c
+++ b/src/message.c
@@ -128,11 +128,11 @@ static void populate_context_instag(OtrlUserState us, const OtrlMessageAppOps
p_instag = otrl_instag_find(us, accountname, protocol);
}
- if (!p_instag || p_instag->instag < OTRL_MIN_VALID_INSTAG) {
- p_instag->instag = otrl_instag_get_new();
+ if (p_instag && p_instag->instag >= OTRL_MIN_VALID_INSTAG) {
+ context->our_instance = p_instag->instag;
+ } else {
+ context->our_instance = otrl_instag_get_new();
}
-
- context->our_instance = p_instag->instag;
}
/* Deallocate a message allocated by other otrl_message_* routines. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libotr.git
More information about the Pkg-privacy-commits
mailing list