aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 20:55:22 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 20:55:22 +0000
commite9292acc7beeb4a3892113bdc31c03fd555fe818 (patch)
tree1cdd53a34528f2cc8b4a08cfc89c9d70dc00ac8e /apps/app_directory.c
parent92a0ae5baf6918dc7e7e82f2bf84facf0a9d603b (diff)
Merged revisions 152646 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r152646 | mmichelson | 2008-10-29 15:53:53 -0500 (Wed, 29 Oct 2008) | 9 lines If there was no named defined in a voicemail.conf mailbox entry, then app_directory would crash when attempting to read that entry from the file. We now check for the NULL or empty string properly so that there will be no crash. (closes issue #13804) Reported by: bluecrow76 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@152648 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_directory.c')
-rw-r--r--apps/app_directory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 59a82a238..fb2c4783c 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -131,6 +131,10 @@ static int compare(const char *text, const char *template)
{
char digit;
+ if (ast_strlen_zero(text)) {
+ return -1;
+ }
+
while (*template) {
digit = toupper(*text++);
switch (digit) {