[asterisk-commits] russell: branch 1.2 r43699 - /branches/1.2/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Sep 26 13:23:16 MST 2006


Author: russell
Date: Tue Sep 26 15:23:15 2006
New Revision: 43699

URL: http://svn.digium.com/view/asterisk?rev=43699&view=rev
Log:
When parsing the sections of voicemail.conf that contain mailbox definitions,
don't introduce a length limit on the definition by using a 256 byte temporary
storage buffer.  Instead, make the temporary buffer just as big as it needs
to be to hold the entire mailbox definition.
(fixes BE-68)

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=43699&r1=43698&r2=43699&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Tue Sep 26 15:23:15 2006
@@ -5545,12 +5545,13 @@
 static int append_mailbox(char *context, char *mbox, char *data)
 {
 	/* Assumes lock is already held */
-	char tmp[256] = "";
+	char *tmp;
 	char *stringp;
 	char *s;
 	struct ast_vm_user *vmu;
 
-	ast_copy_string(tmp, data, sizeof(tmp));
+	tmp = ast_strdupa(data);
+
 	vmu = malloc(sizeof(struct ast_vm_user));
 	if (vmu) {
 		memset(vmu, 0, sizeof(struct ast_vm_user));



More information about the asterisk-commits mailing list