[asterisk-commits] tilghman: trunk r172741 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 31 20:44:23 CST 2009


Author: tilghman
Date: Sat Jan 31 20:44:23 2009
New Revision: 172741

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=172741
Log:
Blank argument crashes Asterisk
(closes issue #14377)
 Reported by: amorsen

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=172741&r1=172740&r2=172741
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sat Jan 31 20:44:23 2009
@@ -9627,6 +9627,11 @@
 
 	AST_NONSTANDARD_APP_ARGS(arg, args, '@');
 
+	if (ast_strlen_zero(arg.mbox)) {
+		ast_log(LOG_ERROR, "MAILBOX_EXISTS requires an argument (<mailbox>[@<context>])\n");
+		return -1;
+	}
+
 	ast_copy_string(buf, find_user(&svm, ast_strlen_zero(arg.context) ? "default" : arg.context, arg.mbox) ? "1" : "0", len);
 	return 0;
 }




More information about the asterisk-commits mailing list