diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-01-20 20:26:55 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-01-20 20:26:55 +0000 |
commit | b98a25ef93a296263b5e22f6c81efb8fd6186031 (patch) | |
tree | 846e926092975e25d072c62587f0cf659f148caa /apps/app_mixmonitor.c | |
parent | 43621b05a9bcc79f8e5a51f38c90674793ae87f3 (diff) |
Prevent potential buffer overflow on AMI MixMonitor command.
Don't be alarmed. This only affected trunk, and it would have
required manager access to your system.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r-- | apps/app_mixmonitor.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index b7d40f3f7..99dc7a4a8 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -923,9 +923,7 @@ static int manager_mixmonitor(struct mansession *s, const struct message *m) return AMI_SUCCESS; } - strcpy(args, file); - strcat(args, ","); - strcat(args, options); + snprintf(args, sizeof(args), "%s,%s", file, options); ast_channel_lock(c); res = mixmonitor_exec(c, args); |