aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-10-20 11:35:45 +0100
committerMark Haines <mjark@negativecurvature.net>2016-10-20 11:35:45 +0100
commit3091dc2b1d5eab575bfe886bf1d6f2414797373f (patch)
tree61a8e0bc8a1e805c4b76fff110380d9338ff50a8
parent653790eacbf7dcf94cbf181657cdb0c30c890c3f (diff)
Add NULL check for message_index pointer
-rw-r--r--src/inbound_group_session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inbound_group_session.c b/src/inbound_group_session.c
index ed313a0..a54e55f 100644
--- a/src/inbound_group_session.c
+++ b/src/inbound_group_session.c
@@ -287,7 +287,9 @@ static size_t _decrypt(
return (size_t)-1;
}
- *message_index = decoded_results.message_index;
+ if (message_index != NULL) {
+ *message_index = decoded_results.message_index;
+ }
/* verify the signature. We could do this before decoding the message, but
* we allow for the possibility of future protocol versions which use a