diff --git a/apps/app_directory.c b/apps/app_directory.c index 59a82a2387..fb2c4783cc 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) {