summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-09-21 19:24:08 +0000
committerJoshua Colp <jcolp@digium.com>2016-09-21 19:24:08 +0000
commit64df75b02c95b15eabf8abde9a819a8a3e5b25d4 (patch)
treecdbf40f0109fd90fb495a3317e288ae6fc8801be /main
parent79070e486d44ac48ff4bed9771c26f69fee9dab5 (diff)
core: Ensure presencestate subtype and message are NULL.
When retrieving presence state information there is no guarantee that the subtype and message passed in are set to NULL. This change ensures they are. ASTERISK-26397 #close Change-Id: If38cd730e409e9a9b6eb9adef6591d15a9e61f86
Diffstat (limited to 'main')
-rw-r--r--main/presencestate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/presencestate.c b/main/presencestate.c
index 3be2ebeed..c0a0ebdc1 100644
--- a/main/presencestate.c
+++ b/main/presencestate.c
@@ -161,6 +161,9 @@ static enum ast_presence_state ast_presence_state_helper(const char *presence_pr
[AST_PRESENCE_DND] = 7
};
+ *subtype = NULL;
+ *message = NULL;
+
while ((label = strsep(&labels, "&"))) {
enum ast_presence_state next_state = AST_PRESENCE_INVALID;
char *next_subtype = NULL;