aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 20:54:49 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-29 20:54:49 +0000
commitb73f232772fe2933aebe9eb0c22bb66a36e16510 (patch)
tree8cd2a6a836c846e684ad3d3290d35917f18dcffa
parent106dc897f64acdbd6ec4720f3129ad7392b2555c (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.0@152647 f38db490-d61c-443f-a65b-d21fe96a405b
-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 86a2c842a..ff342085f 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) {