[svn-commits] kmoore: trunk r419111 - /trunk/main/dial.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 21 12:04:01 CDT 2014


Author: kmoore
Date: Mon Jul 21 12:03:58 2014
New Revision: 419111

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419111
Log:
Dial API: Prevent crash on NULL cap

This prevents a crash in the Dial API triggered by use of the Page()
application where a format capability struct was used before checking
whether it was NULL.

ASTERISK-24074 #close

Modified:
    trunk/main/dial.c

Modified: trunk/main/dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/dial.c?view=diff&rev=419111&r1=419110&r2=419111
==============================================================================
--- trunk/main/dial.c (original)
+++ trunk/main/dial.c Mon Jul 21 12:03:58 2014
@@ -300,7 +300,7 @@
 	/* Copy device string over */
 	ast_copy_string(numsubst, channel->device, sizeof(numsubst));
 
-	if (ast_format_cap_count(cap)) {
+	if (cap && ast_format_cap_count(cap)) {
 		cap_request = cap;
 	} else if (chan) {
 		cap_request = ast_channel_nativeformats(chan);




More information about the svn-commits mailing list