[asterisk-commits] coreyfarrell: branch 11 r415066 - in /branches/11: ./ apps/ apps/confbridge/i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 4 02:20:27 CDT 2014


Author: coreyfarrell
Date: Wed Jun  4 02:20:22 2014
New Revision: 415066

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=415066
Log:
app_confbridge: Correct verification of conference name length

Conference names were not checked for maximum length, allowing unexpected
behaviour.  This change adds checking to ensure the maximum length is not
exceeded.  The maximum length is also changed from 32 to AST_MAX_EXTENSION.

ASTERISK-23035 #close
Reported by: Iñaki Cívico
Tested by: Iñaki Cívico
Patches:
    confbridge-enforce_max-1.8.patch uploaded by coreyfarrell (license 5909)
    confbridge-enforce_max-11up.patch uploaded by coreyfarrell (license 5909)
........

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

Modified:
    branches/11/   (props changed)
    branches/11/apps/app_confbridge.c
    branches/11/apps/confbridge/include/confbridge.h

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

Modified: branches/11/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_confbridge.c?view=diff&rev=415066&r1=415065&r2=415066
==============================================================================
--- branches/11/apps/app_confbridge.c (original)
+++ branches/11/apps/app_confbridge.c Wed Jun  4 02:20:22 2014
@@ -1587,16 +1587,22 @@
 		ast_answer(chan);
 	}
 
-	if (ast_strlen_zero(data)) {
+	/* We need to make a copy of the input string if we are going to modify it! */
+	parse = ast_strdupa(data);
+
+	AST_STANDARD_APP_ARGS(args, parse);
+
+	if (ast_strlen_zero(args.conf_name)) {
 		ast_log(LOG_WARNING, "%s requires an argument (conference name[,options])\n", app);
 		res = -1;
 		goto confbridge_cleanup;
 	}
 
-	/* We need to make a copy of the input string if we are going to modify it! */
-	parse = ast_strdupa(data);
-
-	AST_STANDARD_APP_ARGS(args, parse);
+	if (strlen(args.conf_name) >= MAX_CONF_NAME) {
+		ast_log(LOG_WARNING, "%s does not accept conference names longer than %d\n", app, MAX_CONF_NAME - 1);
+		res = -1;
+		goto confbridge_cleanup;
+	}
 
 	/* bridge profile name */
 	if (args.argc > 1 && !ast_strlen_zero(args.b_profile_name)) {

Modified: branches/11/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/confbridge/include/confbridge.h?view=diff&rev=415066&r1=415065&r2=415066
==============================================================================
--- branches/11/apps/confbridge/include/confbridge.h (original)
+++ branches/11/apps/confbridge/include/confbridge.h Wed Jun  4 02:20:22 2014
@@ -31,7 +31,7 @@
 #include "conf_state.h"
 
 /* Maximum length of a conference bridge name */
-#define MAX_CONF_NAME 32
+#define MAX_CONF_NAME AST_MAX_EXTENSION
 /* Maximum length of a conference pin */
 #define MAX_PIN     80
 




More information about the asterisk-commits mailing list