[asterisk-commits] jpeeler: trunk r118176 - /trunk/main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 23 19:37:01 CDT 2008


Author: jpeeler
Date: Fri May 23 19:37:01 2008
New Revision: 118176

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118176
Log:
Fixes segfault in parking, patch submitted by bmd.


Modified:
    trunk/main/features.c

Modified: trunk/main/features.c
URL: http://svn.digium.com/view/asterisk/trunk/main/features.c?view=diff&rev=118176&r1=118175&r2=118176
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Fri May 23 19:37:01 2008
@@ -2601,7 +2601,7 @@
 	   lot context eventually */
 	int res = 0;
 
-	char *parse;
+	char *parse = NULL;
 	AST_DECLARE_APP_ARGS(app_args,
 		AST_APP_ARG(timeout);
 		AST_APP_ARG(return_con);
@@ -2637,7 +2637,7 @@
 		};
 		struct ast_flags flags = { 0 };
 
-		if (!ast_strlen_zero(app_args.timeout)) {
+		if (parse && !ast_strlen_zero(app_args.timeout)) {
 			if (sscanf(app_args.timeout, "%d", &args.timeout) != 1) {
 				ast_log(LOG_WARNING, "Invalid timeout '%s' provided\n", app_args.timeout);
 				args.timeout = 0;
@@ -2646,7 +2646,7 @@
 
 		args.return_con = app_args.return_con;
 		args.return_ext = app_args.return_ext;
-		if (!ast_strlen_zero(app_args.return_pri)) {
+		if (parse && !ast_strlen_zero(app_args.return_pri)) {
 			if (sscanf(app_args.return_pri, "%d", &args.return_pri) != 1) {
 				ast_log(LOG_WARNING, "Invalid priority '%s' specified\n", app_args.return_pri);
 				args.return_pri = 0;




More information about the asterisk-commits mailing list