[asterisk-commits] file: branch file/bridging-phase2 r180529 - /team/file/bridging-phase2/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 6 10:03:59 CST 2009


Author: file
Date: Fri Mar  6 10:03:56 2009
New Revision: 180529

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180529
Log:
Add some sanity checking to feature and interval hooks.

Modified:
    team/file/bridging-phase2/main/bridging.c

Modified: team/file/bridging-phase2/main/bridging.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging-phase2/main/bridging.c?view=diff&rev=180529&r1=180528&r2=180529
==============================================================================
--- team/file/bridging-phase2/main/bridging.c (original)
+++ team/file/bridging-phase2/main/bridging.c Fri Mar  6 10:03:56 2009
@@ -1437,7 +1437,7 @@
 	struct ast_bridge_features_hook *hook = NULL;
 
 	/* Allocate new memory and setup it's various variables */
-	if (!(hook = ast_calloc(1, sizeof(*hook)))) {
+	if (ast_strlen_zero(dtmf) || !callback || !(hook = ast_calloc(1, sizeof(*hook)))) {
 		return -1;
 	}
 
@@ -1457,7 +1457,7 @@
 {
 	struct ast_bridge_features_hook *hook = NULL, *existing_hook = NULL;
 
-	if (!(hook = ast_calloc(1, sizeof(*hook)))) {
+	if (!interval || !callback || !(hook = ast_calloc(1, sizeof(*hook)))) {
 		return -1;
 	}
 




More information about the asterisk-commits mailing list