[asterisk-commits] cdr: Fix 'core show channel' CDR variable truncation. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 15 10:20:51 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: cdr: Fix 'core show channel' CDR variable truncation.
......................................................................


cdr: Fix 'core show channel' CDR variable truncation.

When the new Bridging API was implemented, the workspace variable
changed to a malloc'd string, causing sizeof() to always be 8 (char).

Revert back to stored on stack string for workspace.

ASTERISK-25090 #close

Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7
---
M main/cdr.c
1 file changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, approved; Verified
  Corey Farrell: Looks good to me, but someone else must approve



diff --git a/main/cdr.c b/main/cdr.c
index 9b32f9d..c6f49f1 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -3096,12 +3096,8 @@
 	struct cdr_object *it_cdr;
 	struct ast_var_t *variable;
 	const char *var;
-	RAII_VAR(char *, workspace, ast_malloc(256), ast_free);
+	char workspace[256];
 	int total = 0, x = 0, i;
-
-	if (!workspace) {
-		return 0;
-	}
 
 	if (!cdr) {
 		RAII_VAR(struct module_config *, mod_cfg,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: snuffy <snuffy22 at gmail.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list