From 296b0992c5921f62f87db28187ec81f0f3509325 Mon Sep 17 00:00:00 2001 From: tilghman Date: Thu, 24 Sep 2009 07:45:33 +0000 Subject: Merged revisions 219987 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r219987 | tilghman | 2009-09-24 02:39:44 -0500 (Thu, 24 Sep 2009) | 8 lines 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/branches/1.6.2@219989 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_directory.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps') diff --git a/apps/app_directory.c b/apps/app_directory.c index fe8139de5..82a9fccb8 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 */); -- cgit v1.2.3