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

Joshua Colp asteriskteam at digium.com
Wed Sep 21 15:03:54 CDT 2016


Joshua Colp has uploaded a new change for review.

  https://gerrit.asterisk.org/3961

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


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/61/3961/1

diff --git a/main/presencestate.c b/main/presencestate.c
index 207e2aa..56c903c 100644
--- a/main/presencestate.c
+++ b/main/presencestate.c
@@ -151,6 +151,9 @@
 	char *label = ast_strdupa(presence_provider);
 	int res = AST_PRESENCE_INVALID;
 
+	*subtype = NULL;
+	*message = NULL;
+
 	if (check_cache) {
 		res = presence_state_cached(presence_provider, subtype, message);
 		if (res != AST_PRESENCE_INVALID) {

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

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



More information about the asterisk-code-review mailing list