[asterisk-commits] trunk r19892 - in /trunk: ./ apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Apr 13 13:40:24 MST 2006


Author: tilghman
Date: Thu Apr 13 15:40:23 2006
New Revision: 19892

URL: http://svn.digium.com/view/asterisk?rev=19892&view=rev
Log:
Merged revisions 19891 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19891 | tilghman | 2006-04-13 15:37:50 -0500 (Thu, 13 Apr 2006) | 2 lines

Bug 6947 - Allow vm broadcasts to more than 256 characters worth of mailboxes

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=19892&r1=19891&r2=19892&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Apr 13 15:40:23 2006
@@ -5604,7 +5604,7 @@
 {
 	int res = 0;
 	struct localuser *u;
-	char tmp[256];
+	char *tmp;
 	struct leave_vm_options leave_options;
 	struct ast_flags flags = { 0 };
 	char *opts[OPT_ARG_ARRAY_SIZE];
@@ -5621,7 +5621,12 @@
 		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;
+		}
 		AST_STANDARD_APP_ARGS(args, tmp);
 		if (args.argc == 2) {
 			if (ast_app_parse_options(vm_app_options, &flags, opts, args.argv1)) {
@@ -5657,6 +5662,7 @@
 			}
 		}
 	} else {
+		char tmp[256];
 		res = ast_app_getdata(chan, "vm-whichbox", tmp, sizeof(tmp) - 1, 0);
 		if (res < 0) {
 			LOCAL_USER_REMOVE(u);



More information about the asterisk-commits mailing list