From 84dcf8e6b150d1d691de7fd6ddd17772e89a9532 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Wed, 29 Oct 2008 20:54:49 +0000 Subject: [PATCH] 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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@152647 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_directory.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/app_directory.c b/apps/app_directory.c index 86a2c842aa..ff342085f9 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -222,6 +222,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) {