[asterisk-commits] branch 1.2 r19891 - /branches/1.2/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Apr 13 13:37:52 MST 2006


Author: tilghman
Date: Thu Apr 13 15:37:50 2006
New Revision: 19891

URL: http://svn.digium.com/view/asterisk?rev=19891&view=rev
Log:
Bug 6947 - Allow vm broadcasts to more than 256 characters worth of mailboxes

Modified:
    branches/1.2/apps/app_voicemail.c

Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?rev=19891&r1=19890&r2=19891&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Thu Apr 13 15:37:50 2006
@@ -5497,7 +5497,7 @@
 {
 	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 @@
 		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 @@
 			}
 		}
 	} 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