[asterisk-commits] elguero: branch 12 r409626 - in /branches/12: ./ funcs/func_audiohookinherit.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 4 13:34:08 CST 2014


Author: elguero
Date: Tue Mar  4 13:34:05 2014
New Revision: 409626

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=409626
Log:
func_audiohookinheritance: Check If A Channel Was Specified

This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

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

Merged revisions 409623 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409625 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/funcs/func_audiohookinherit.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/funcs/func_audiohookinherit.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/funcs/func_audiohookinherit.c?view=diff&rev=409626&r1=409625&r2=409626
==============================================================================
--- branches/12/funcs/func_audiohookinherit.c (original)
+++ branches/12/funcs/func_audiohookinherit.c Tue Mar  4 13:34:05 2014
@@ -228,6 +228,11 @@
 		return -1;
 	}
 
+	if (!chan) {
+		ast_log(LOG_WARNING, "No channel was provided to INHERITANCE function.\n");
+		return -1;
+	}
+
 	allow = ast_true(value);
 
 	/* Step 2: retrieve or set up datastore */




More information about the asterisk-commits mailing list