diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-13 21:06:44 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-13 21:06:44 +0000 |
commit | 16d5742e5d3599db6da7e270d28492c4e9d6b218 (patch) | |
tree | 5010691433a42141c3102b314817f9c8ad7ecff3 /apps | |
parent | f87a845d9ebb91cb81eb2ff0a4ceec8548bbf53e (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@19929 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b925a9746..70a27f672 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5497,7 +5497,7 @@ static int vm_exec(struct ast_channel *chan, void *data) { int res = 0; struct localuser *u; - char tmp[256]; + char *tmp; struct leave_vm_options leave_options; int argc; char *argv[2]; @@ -5512,7 +5512,12 @@ static int vm_exec(struct ast_channel *chan, void *data) ast_answer(chan); if (!ast_strlen_zero(data)) { - ast_copy_string(tmp, data, sizeof(tmp)); + tmp = ast_strdupa((char *)data); + if (!tmp) { + ast_log(LOG_ERROR, "Out of memory\n"); + LOCAL_USER_REMOVE(u); + return -1; + } argc = ast_app_separate_args(tmp, '|', argv, sizeof(argv) / sizeof(argv[0])); if (argc == 2) { if (ast_app_parse_options(vm_app_options, &flags, opts, argv[1])) { @@ -5551,6 +5556,7 @@ static int vm_exec(struct ast_channel *chan, void *data) } } } else { + char tmp[256]; res = ast_app_getdata(chan, "vm-whichbox", tmp, sizeof(tmp) - 1, 0); if (res < 0) { LOCAL_USER_REMOVE(u); |