diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-24 07:39:44 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-24 07:39:44 +0000 |
commit | 35bf72ba3a84d472bca95f997238d984b7a66344 (patch) | |
tree | feffc5f27e771f742be008aeed601c5c3b760521 /apps | |
parent | 350b00e791a5de8ee5634ba7b0d60b26300cccd2 (diff) |
Fix two possible crashes, one only in 1.6.1 and one in 1.6.1 forward.
(closes issue #15739)
Reported by: DLNoah, jeffg
Patches:
20090914__issue15739.diff.txt uploaded by tilghman (license 14)
20090922__issue15739.diff.txt uploaded by tilghman (license 14)
Tested by: DLNoah, jeffg
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@219987 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_directory.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index e1f5fb27b..34001ad51 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -525,6 +525,11 @@ static int search_directory_sub(const char *context, struct ast_config *vmcfg, s strsep(&bufptr, ","); pos = strsep(&bufptr, ","); + /* No name to compare against */ + if (ast_strlen_zero(pos)) { + continue; + } + res = 0; if (ast_test_flag(&flags, OPT_LISTBYLASTNAME)) { res = check_match(&item, context, pos, v->name, ext, 0 /* use_first_name */); |