aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 20:53:53 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 20:53:53 +0000
commit12740f714de8314e4b9933953f22e965dc9b24d5 (patch)
tree558f31a64a6283976bdbadd47c0da45d744c9a56 /apps/app_directory.c
parent24ecd879c04300831002bcf29a424bd3a0800deb (diff)
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/trunk@152646 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 69523ec65..30b8f7f46 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) {