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
........
Merged revisions 409626 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409627
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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 */