[asterisk-commits] russell: branch 1.4 r85515 - /branches/1.4/pbx/pbx_realtime.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 12 10:40:35 CDT 2007
Author: russell
Date: Fri Oct 12 10:40:35 2007
New Revision: 85515
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85515
Log:
Fix the potential use of an uninitialized buffer in a log message.
(closes issue #10958)
Reported by: dimas
Patches:
realtime.patch uploaded by dimas (license 88)
Modified:
branches/1.4/pbx/pbx_realtime.c
Modified: branches/1.4/pbx/pbx_realtime.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/pbx_realtime.c?view=diff&rev=85515&r1=85514&r2=85515
==============================================================================
--- branches/1.4/pbx/pbx_realtime.c (original)
+++ branches/1.4/pbx/pbx_realtime.c Fri Oct 12 10:40:35 2007
@@ -178,12 +178,12 @@
if (var) {
char *tmp="";
- char app[256];
+ char *app = NULL;
struct ast_variable *v;
for (v = var; v ; v = v->next) {
if (!strcasecmp(v->name, "app"))
- ast_copy_string(app, v->value, sizeof(app));
+ app = ast_strdupa(v->value);
else if (!strcasecmp(v->name, "appdata"))
tmp = ast_strdupa(v->value);
}
@@ -216,6 +216,8 @@
res = pbx_exec(chan, a, appdata);
} else
ast_log(LOG_NOTICE, "No such application '%s' for extension '%s' in context '%s'\n", app, exten, context);
+ } else {
+ ast_log(LOG_WARNING, "No application specified for realtime extension '%s' in context '%s'\n", exten, context);
}
}
return res;
More information about the asterisk-commits
mailing list