[asterisk-commits] res pjsip pubsub.c: Use ast alloca() instead of alloca(). (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 10 14:54:38 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: res_pjsip_pubsub.c: Use ast_alloca() instead of alloca().
......................................................................


res_pjsip_pubsub.c: Use ast_alloca() instead of alloca().

Change-Id: Ia396096b4fedc2874649ca11137612c3f55e83e3
---
M res/res_pjsip_pubsub.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Ashley Sanders: Looks good to me, but someone else must approve
  Jonathan Rose: Looks good to me, but someone else must approve



diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 088f807..f818789 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -1358,7 +1358,7 @@
 
 	request_uri = pjsip_uri_get_uri(rdata.msg_info.msg->line.req.uri);
 	resource_size = pj_strlen(&request_uri->user) + 1;
-	resource = alloca(resource_size);
+	resource = ast_alloca(resource_size);
 	ast_copy_pj_str(resource, &request_uri->user, resource_size);
 
 	/* Update the expiration header with the new expiration */
@@ -2578,7 +2578,7 @@
 
 	request_uri_sip = pjsip_uri_get_uri(request_uri);
 	resource_size = pj_strlen(&request_uri_sip->user) + 1;
-	resource = alloca(resource_size);
+	resource = ast_alloca(resource_size);
 	ast_copy_pj_str(resource, &request_uri_sip->user, resource_size);
 
 	expires_header = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, rdata->msg_info.msg->hdr.next);
@@ -2795,7 +2795,7 @@
 
 	request_uri_sip = pjsip_uri_get_uri(request_uri);
 	resource_size = pj_strlen(&request_uri_sip->user) + 1;
-	resource_name = alloca(resource_size);
+	resource_name = ast_alloca(resource_size);
 	ast_copy_pj_str(resource_name, &request_uri_sip->user, resource_size);
 
 	resource = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "inbound-publication", resource_name);
@@ -3001,7 +3001,7 @@
 	 */
 	accept_len = strlen(generator->type) + strlen(generator->subtype) + 1;
 
-	accept.ptr = alloca(accept_len);
+	accept.ptr = ast_alloca(accept_len);
 	accept.slen = accept_len;
 	/* Safe use of sprintf */
 	sprintf(accept.ptr, "%s/%s", generator->type, generator->subtype);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia396096b4fedc2874649ca11137612c3f55e83e3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Jonathan Rose <jrose at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list