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
This commit is contained in:
Mark Michelson
2012-01-20 20:26:55 +00:00
parent 43621b05a9
commit b98a25ef93

View File

@@ -923,9 +923,7 @@ static int manager_mixmonitor(struct mansession *s, const struct message *m)
return AMI_SUCCESS; return AMI_SUCCESS;
} }
strcpy(args, file); snprintf(args, sizeof(args), "%s,%s", file, options);
strcat(args, ",");
strcat(args, options);
ast_channel_lock(c); ast_channel_lock(c);
res = mixmonitor_exec(c, args); res = mixmonitor_exec(c, args);