[asterisk-commits] file: trunk r39731 - /trunk/cdr.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Aug 14 11:07:22 MST 2006


Author: file
Date: Mon Aug 14 13:07:21 2006
New Revision: 39731

URL: http://svn.digium.com/view/asterisk?rev=39731&view=rev
Log:
Fix for uninitialized workspace in ast_cdr_getvar, pointed out by sergee

Modified:
    trunk/cdr.c

Modified: trunk/cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr.c?rev=39731&r1=39730&r2=39731&view=diff
==============================================================================
--- trunk/cdr.c (original)
+++ trunk/cdr.c Mon Aug 14 13:07:21 2006
@@ -267,6 +267,8 @@
 		ast_copy_string(workspace, cdr->userfield, workspacelen);
 	else if ((varbuf = ast_cdr_getvar_internal(cdr, name, recur)))
 		ast_copy_string(workspace, varbuf, workspacelen);
+	else
+		workspace[0] = '\0';
 
 	if (!ast_strlen_zero(workspace))
 		*ret = workspace;



More information about the asterisk-commits mailing list