summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-10-29 20:53:53 +0000
committerMark Michelson <mmichelson@digium.com>2008-10-29 20:53:53 +0000
commit5652a7b81ede72b23199f5cd166d37c050dc86b5 (patch)
tree558f31a64a6283976bdbadd47c0da45d744c9a56 /apps
parentd736ac2b19b02dab04d3a2bd15ad4058c332e360 (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: https://origsvn.digium.com/svn/asterisk/trunk@152646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-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) {