[Asterisk-code-review] core: Ensure presencestate subtype and message are NULL. (asterisk[14])

Joshua Colp asteriskteam at digium.com
Wed Sep 21 14:27:07 CDT 2016


Joshua Colp has uploaded a new change for review.

  https://gerrit.asterisk.org/3957

Change subject: core: Ensure presencestate subtype and message are NULL.
......................................................................

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
---
M main/presencestate.c
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/57/3957/1

diff --git a/main/presencestate.c b/main/presencestate.c
index 3be2ebe..c0a0ebd 100644
--- a/main/presencestate.c
+++ b/main/presencestate.c
@@ -161,6 +161,9 @@
 		[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;

-- 
To view, visit https://gerrit.asterisk.org/3957
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If38cd730e409e9a9b6eb9adef6591d15a9e61f86
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list