summaryrefslogtreecommitdiff
path: root/main/presencestate.c
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 14:27:46 -0500
commita805d779e84c9e0fd4905c031b291bc938fdc816 (patch)
tree38a285f53307f373a866706089da5ad9137fcae6 /main/presencestate.c
parentccc0bfa69c8fda50ac9c660f055e3681e87d6561 (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/presencestate.c')
-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;