aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-12 15:40:35 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-12 15:40:35 +0000
commit61bdc1985543379ae63a146cd91bf0e71f24fcfa (patch)
tree2d3ffdbdbd61844d37cfd1d460b58d79f742bc22 /pbx
parentdfb9a57acefac247bf20d5d00ad9a38cfbcccd77 (diff)
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) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85515 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_realtime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index d1011fe8e..b9be0d456 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -178,12 +178,12 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch
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 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch
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;