diff options
author | Michael L. Young <elgueromexicano@gmail.com> | 2013-09-18 00:13:23 +0000 |
---|---|---|
committer | Michael L. Young <elgueromexicano@gmail.com> | 2013-09-18 00:13:23 +0000 |
commit | 38fa6288127450aa360bf9350e7040b3f205ce95 (patch) | |
tree | d83eded2b7963e43caabe28363ef801c9a40ae0b /main/features_config.c | |
parent | 391f0003c424947aba064839a8283160edbb6cd4 (diff) |
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
........
Merged revisions 399294 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/features_config.c')
-rw-r--r-- | main/features_config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/features_config.c b/main/features_config.c index d9a304302..91e7df338 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 |