From 474c5df62f72f704452806b8545099461aa88ce1 Mon Sep 17 00:00:00 2001 From: "Michael L. Young" Date: Wed, 18 Sep 2013 00:12:21 +0000 Subject: [PATCH] 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@399294 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features_config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/features_config.c b/main/features_config.c index d9a304302d..91e7df338a 100644 --- a/main/features_config.c +++ b/main/features_config.c @@ -1348,6 +1348,11 @@ static int applicationmap_handler(const struct aco_option *opt, *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