[asterisk-commits] tilghman: trunk r219987 - /trunk/apps/app_directory.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 24 02:39:50 CDT 2009


Author: tilghman
Date: Thu Sep 24 02:39:44 2009
New Revision: 219987

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=219987
Log:
Fix two possible crashes, one only in 1.6.1 and one in 1.6.0 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

Modified:
    trunk/apps/app_directory.c

Modified: trunk/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_directory.c?view=diff&rev=219987&r1=219986&r2=219987
==============================================================================
--- trunk/apps/app_directory.c (original)
+++ trunk/apps/app_directory.c Thu Sep 24 02:39:44 2009
@@ -525,6 +525,11 @@
 		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 */);




More information about the asterisk-commits mailing list