[asterisk-commits] elguero: branch 12 r399294 - /branches/12/main/features_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 17 19:12:23 CDT 2013


Author: elguero
Date: Tue Sep 17 19:12:21 2013
New Revision: 399294

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399294
Log:
Fix Segfault In features-config.c When Application Has No Arguments

Some applications do not require arguments.  Therefore, when parsing application
maps in features.conf, it is possible that app_data will be set to NULL.

* This patch sets app_data to "" if it is NULL.

Review: https://reviewboard.asterisk.org/r/2804

Modified:
    branches/12/main/features_config.c

Modified: branches/12/main/features_config.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/features_config.c?view=diff&rev=399294&r1=399293&r2=399294
==============================================================================
--- branches/12/main/features_config.c (original)
+++ branches/12/main/features_config.c Tue Sep 17 19:12:21 2013
@@ -1348,6 +1348,11 @@
 		*slash = '\0';
 	}
 
+	/* Some applications do not require arguments. */
+	if (!args.app_data) {
+		args.app_data = "";
+	}
+
 	/* Two syntaxes allowed for applicationmap:
 	 * Old: foo = *1,self,NoOp,Boo!,default
 	 * New: foo = *1,self,NoOp(Boo!),default




More information about the asterisk-commits mailing list