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) {