[Asterisk-cvs] asterisk pbx.c,1.164,1.165
anthm at lists.digium.com
anthm at lists.digium.com
Tue Oct 26 21:30:43 CDT 2004
- Previous message: [Asterisk-cvs] asterisk/channels chan_agent.c, 1.87,
1.88 chan_alsa.c, 1.28, 1.29 chan_h323.c, 1.84,
1.85 chan_iax2.c, 1.212, 1.213 chan_local.c, 1.36,
1.37 chan_mgcp.c, 1.88, 1.89 chan_modem.c, 1.31,
1.32 chan_nbs.c, 1.11, 1.12 chan_oss.c, 1.36,
1.37 chan_phone.c, 1.35, 1.36 chan_sip.c, 1.543,
1.544 chan_skinny.c, 1.58, 1.59 chan_vpb.c, 1.43,
1.44 chan_zap.c, 1.365, 1.366
- Next message: [Asterisk-cvs] asterisk pbx.c,1.165,1.166
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4507
Modified Files:
pbx.c
Log Message:
add more paranoid handling to pbx_builtin_serialize_variables
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- pbx.c 24 Oct 2004 02:53:24 -0000 1.164
+++ pbx.c 27 Oct 2004 01:34:06 -0000 1.165
@@ -4921,18 +4921,21 @@
{
struct ast_var_t *variables;
struct varshead *headp;
+ char *var=NULL ,*val=NULL;
int total = 0;
memset(buf,0,size);
if (chan) {
headp=&chan->varshead;
AST_LIST_TRAVERSE(headp,variables,entries) {
- snprintf(buf + strlen(buf), size - strlen(buf), "%s=%s\n", ast_var_name(variables), ast_var_value(variables));
- if(strlen(buf) >= size) {
- ast_log(LOG_ERROR,"Data Buffer Size Exceeded!\n");
- break;
+ if(chan && variables && (var=ast_var_name(variables)) && (val=ast_var_value(variables))) {
+ snprintf(buf + strlen(buf), size - strlen(buf), "%s=%s\n", var, val);
+ if(strlen(buf) >= size) {
+ ast_log(LOG_ERROR,"Data Buffer Size Exceeded!\n");
+ break;
+ }
+ total++;
}
- total++;
}
}
- Previous message: [Asterisk-cvs] asterisk/channels chan_agent.c, 1.87,
1.88 chan_alsa.c, 1.28, 1.29 chan_h323.c, 1.84,
1.85 chan_iax2.c, 1.212, 1.213 chan_local.c, 1.36,
1.37 chan_mgcp.c, 1.88, 1.89 chan_modem.c, 1.31,
1.32 chan_nbs.c, 1.11, 1.12 chan_oss.c, 1.36,
1.37 chan_phone.c, 1.35, 1.36 chan_sip.c, 1.543,
1.544 chan_skinny.c, 1.58, 1.59 chan_vpb.c, 1.43,
1.44 chan_zap.c, 1.365, 1.366
- Next message: [Asterisk-cvs] asterisk pbx.c,1.165,1.166
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list