[asterisk-commits] tilghman: tag 1.4.26.1 r211596 - in /tags/1.4.26.1: ./ agi/ apps/ channels/ c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 10 15:14:39 CDT 2009


Author: tilghman
Date: Mon Aug 10 15:14:34 2009
New Revision: 211596

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=211596
Log:
Changes to make 1.4.26 into 1.4.26.1

Removed:
    tags/1.4.26.1/asterisk-1.4.26-summary.html
    tags/1.4.26.1/asterisk-1.4.26-summary.txt
Modified:
    tags/1.4.26.1/   (props changed)
    tags/1.4.26.1/.version
    tags/1.4.26.1/ChangeLog
    tags/1.4.26.1/agi/eagi-sphinx-test.c
    tags/1.4.26.1/agi/eagi-test.c
    tags/1.4.26.1/apps/app_adsiprog.c
    tags/1.4.26.1/apps/app_alarmreceiver.c
    tags/1.4.26.1/apps/app_chanspy.c
    tags/1.4.26.1/apps/app_dahdibarge.c
    tags/1.4.26.1/apps/app_dial.c
    tags/1.4.26.1/apps/app_disa.c
    tags/1.4.26.1/apps/app_followme.c
    tags/1.4.26.1/apps/app_macro.c
    tags/1.4.26.1/apps/app_meetme.c
    tags/1.4.26.1/apps/app_mixmonitor.c
    tags/1.4.26.1/apps/app_morsecode.c
    tags/1.4.26.1/apps/app_osplookup.c
    tags/1.4.26.1/apps/app_privacy.c
    tags/1.4.26.1/apps/app_queue.c
    tags/1.4.26.1/apps/app_random.c
    tags/1.4.26.1/apps/app_readfile.c
    tags/1.4.26.1/apps/app_record.c
    tags/1.4.26.1/apps/app_rpt.c
    tags/1.4.26.1/apps/app_setcallerid.c
    tags/1.4.26.1/apps/app_sms.c
    tags/1.4.26.1/apps/app_talkdetect.c
    tags/1.4.26.1/apps/app_verbose.c
    tags/1.4.26.1/apps/app_voicemail.c
    tags/1.4.26.1/apps/app_waitforring.c
    tags/1.4.26.1/apps/app_waitforsilence.c
    tags/1.4.26.1/channels/chan_agent.c
    tags/1.4.26.1/channels/chan_dahdi.c
    tags/1.4.26.1/channels/chan_h323.c
    tags/1.4.26.1/channels/chan_iax2.c
    tags/1.4.26.1/channels/chan_mgcp.c
    tags/1.4.26.1/channels/chan_misdn.c
    tags/1.4.26.1/channels/chan_oss.c
    tags/1.4.26.1/channels/chan_phone.c
    tags/1.4.26.1/channels/chan_sip.c
    tags/1.4.26.1/channels/chan_skinny.c
    tags/1.4.26.1/channels/iax2-provision.c
    tags/1.4.26.1/channels/misdn_config.c
    tags/1.4.26.1/codecs/codec_speex.c
    tags/1.4.26.1/doc/CODING-GUIDELINES
    tags/1.4.26.1/funcs/func_channel.c
    tags/1.4.26.1/funcs/func_cut.c
    tags/1.4.26.1/funcs/func_math.c
    tags/1.4.26.1/funcs/func_rand.c
    tags/1.4.26.1/funcs/func_strings.c
    tags/1.4.26.1/main/acl.c
    tags/1.4.26.1/main/asterisk.c
    tags/1.4.26.1/main/cdr.c
    tags/1.4.26.1/main/channel.c
    tags/1.4.26.1/main/cli.c
    tags/1.4.26.1/main/dnsmgr.c
    tags/1.4.26.1/main/frame.c
    tags/1.4.26.1/main/indications.c
    tags/1.4.26.1/main/manager.c
    tags/1.4.26.1/main/pbx.c
    tags/1.4.26.1/main/utils.c
    tags/1.4.26.1/pbx/dundi-parser.c
    tags/1.4.26.1/pbx/pbx_ael.c
    tags/1.4.26.1/pbx/pbx_config.c
    tags/1.4.26.1/pbx/pbx_dundi.c
    tags/1.4.26.1/pbx/pbx_loopback.c
    tags/1.4.26.1/pbx/pbx_spool.c
    tags/1.4.26.1/res/res_agi.c
    tags/1.4.26.1/res/res_features.c
    tags/1.4.26.1/res/res_odbc.c
    tags/1.4.26.1/res/res_smdi.c
    tags/1.4.26.1/utils/frame.c
    tags/1.4.26.1/utils/muted.c

Propchange: tags/1.4.26.1/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: tags/1.4.26.1/.version
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/.version?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/.version (original)
+++ tags/1.4.26.1/.version Mon Aug 10 15:14:34 2009
@@ -1,1 +1,1 @@
-1.4.26
+1.4.26.1

Modified: tags/1.4.26.1/ChangeLog
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/ChangeLog?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/ChangeLog (original)
+++ tags/1.4.26.1/ChangeLog Mon Aug 10 15:14:34 2009
@@ -1,3 +1,9 @@
+2009-08-09  Tilghman Lesher <tlesher at digium.com>
+
+	* Release Asterisk 1.4.26.1
+
+	* AST-2009-005
+
 2009-07-20  Leif Madsen <lmadsen at digium.com>
 
 	* Release Asterisk 1.4.26

Modified: tags/1.4.26.1/agi/eagi-sphinx-test.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/agi/eagi-sphinx-test.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/agi/eagi-sphinx-test.c (original)
+++ tags/1.4.26.1/agi/eagi-sphinx-test.c Mon Aug 10 15:14:34 2009
@@ -214,7 +214,7 @@
 	connect_sphinx();
 	tmp = getenv("agi_enhanced");
 	if (tmp) {
-		if (sscanf(tmp, "%d.%d", &ver, &subver) != 2)
+		if (sscanf(tmp, "%30d.%30d", &ver, &subver) != 2)
 			ver = 0;
 	}
 	if (ver < 1) {

Modified: tags/1.4.26.1/agi/eagi-test.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/agi/eagi-test.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/agi/eagi-test.c (original)
+++ tags/1.4.26.1/agi/eagi-test.c Mon Aug 10 15:14:34 2009
@@ -156,7 +156,7 @@
 	}
 	tmp = getenv("agi_enhanced");
 	if (tmp) {
-		if (sscanf(tmp, "%d.%d", &ver, &subver) != 2)
+		if (sscanf(tmp, "%30d.%30d", &ver, &subver) != 2)
 			ver = 0;
 	}
 	if (ver < 1) {

Modified: tags/1.4.26.1/apps/app_adsiprog.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_adsiprog.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_adsiprog.c (original)
+++ tags/1.4.26.1/apps/app_adsiprog.c Mon Aug 10 15:14:34 2009
@@ -195,7 +195,7 @@
 		if (!(argtype & ARG_NUMBER))
 			return -1;
 		/* Octal value */
-		if (sscanf(src, "%o", (int *)out) != 1)
+		if (sscanf(src, "%30o", (int *)out) != 1)
 			return -1;
 		if (argtype & ARG_STRING) {
 			/* Convert */
@@ -205,7 +205,7 @@
 		if (!(argtype & ARG_NUMBER))
 			return -1;
 		/* Hex value */
-		if (sscanf(src + 2, "%x", (unsigned int *)out) != 1)
+		if (sscanf(src + 2, "%30x", (unsigned int *)out) != 1)
 			return -1;
 		if (argtype & ARG_STRING) {
 			/* Convert */
@@ -215,7 +215,7 @@
 		if (!(argtype & ARG_NUMBER))
 			return -1;
 		/* Hex value */
-		if (sscanf(src, "%d", (int *)out) != 1)
+		if (sscanf(src, "%30d", (int *)out) != 1)
 			return -1;
 		if (argtype & ARG_STRING) {
 			/* Convert */

Modified: tags/1.4.26.1/apps/app_alarmreceiver.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_alarmreceiver.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_alarmreceiver.c (original)
+++ tags/1.4.26.1/apps/app_alarmreceiver.c Mon Aug 10 15:14:34 2009
@@ -125,7 +125,7 @@
 		return;
 	}
 	
-	sscanf(value, "%u", &v);
+	sscanf(value, "%30u", &v);
 	v++;
 	
 	if(option_verbose >= 4)

Modified: tags/1.4.26.1/apps/app_chanspy.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_chanspy.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_chanspy.c (original)
+++ tags/1.4.26.1/apps/app_chanspy.c Mon Aug 10 15:14:34 2009
@@ -731,7 +731,7 @@
 		if (ast_test_flag(&flags, OPTION_VOLUME) && opts[OPT_ARG_VOLUME]) {
 			int vol;
 
-			if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
+			if ((sscanf(opts[OPT_ARG_VOLUME], "%30d", &vol) != 1) || (vol > 4) || (vol < -4))
 				ast_log(LOG_NOTICE, "Volume factor must be a number between -4 and 4\n");
 			else
 				volfactor = vol;
@@ -816,7 +816,7 @@
 		if (ast_test_flag(&flags, OPTION_VOLUME) && opts[OPT_ARG_VOLUME]) {
 			int vol;
 
-			if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
+			if ((sscanf(opts[OPT_ARG_VOLUME], "%30d", &vol) != 1) || (vol > 4) || (vol < -4))
 				ast_log(LOG_NOTICE, "Volume factor must be a number between -4 and 4\n");
 			else
 				volfactor = vol;

Modified: tags/1.4.26.1/apps/app_dahdibarge.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_dahdibarge.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_dahdibarge.c (original)
+++ tags/1.4.26.1/apps/app_dahdibarge.c Mon Aug 10 15:14:34 2009
@@ -277,15 +277,15 @@
 	
 	if (!ast_strlen_zero(data)) {
 		if (dahdimode) {
-			if ((sscanf(data, "DAHDI/%d", &confno) != 1) &&
-			    (sscanf(data, "%d", &confno) != 1)) {
+			if ((sscanf(data, "DAHDI/%30d", &confno) != 1) &&
+			    (sscanf(data, "%30d", &confno) != 1)) {
 				ast_log(LOG_WARNING, "Argument (if specified) must be a channel number, not '%s'\n", (char *) data);
 				ast_module_user_remove(u);
 				return 0;
 			}
 		} else {
-			if ((sscanf(data, "Zap/%d", &confno) != 1) &&
-			    (sscanf(data, "%d", &confno) != 1)) {
+			if ((sscanf(data, "Zap/%30d", &confno) != 1) &&
+			    (sscanf(data, "%30d", &confno) != 1)) {
 				ast_log(LOG_WARNING, "Argument (if specified) must be a channel number, not '%s'\n", (char *) data);
 				ast_module_user_remove(u);
 				return 0;
@@ -301,7 +301,7 @@
 		confstr[0] = '\0';
 		res = ast_app_getdata(chan, "conf-getchannel",confstr, sizeof(confstr) - 1, 0);
 		if (res <0) goto out;
-		if (sscanf(confstr, "%d", &confno) != 1)
+		if (sscanf(confstr, "%30d", &confno) != 1)
 			confno = 0;
 	}
 	if (confno) {

Modified: tags/1.4.26.1/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_dial.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_dial.c (original)
+++ tags/1.4.26.1/apps/app_dial.c Mon Aug 10 15:14:34 2009
@@ -1864,7 +1864,7 @@
 
 	if ((dialdata = strchr(announce, '|'))) {
 		*dialdata++ = '\0';
-		if (sscanf(dialdata, "%d", &sleep) == 1) {
+		if (sscanf(dialdata, "%30d", &sleep) == 1) {
 			sleep *= 1000;
 		} else {
 			ast_log(LOG_ERROR, "%s requires the numerical argument <sleep>\n",rapp);
@@ -1872,7 +1872,7 @@
 		}
 		if ((dialdata = strchr(dialdata, '|'))) {
 			*dialdata++ = '\0';
-			if (sscanf(dialdata, "%d", &loops) != 1) {
+			if (sscanf(dialdata, "%30d", &loops) != 1) {
 				ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp);
 				goto done;
 			}

Modified: tags/1.4.26.1/apps/app_disa.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_disa.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_disa.c (original)
+++ tags/1.4.26.1/apps/app_disa.c Mon Aug 10 15:14:34 2009
@@ -240,7 +240,7 @@
 			if (!(k&1)) { /* if in password state */
 				if (j == '#') { /* end of password */
 					  /* see if this is an integer */
-					if (sscanf(args.passcode,"%d",&j) < 1) { /* nope, it must be a filename */
+					if (sscanf(args.passcode,"%30d",&j) < 1) { /* nope, it must be a filename */
 						fp = fopen(args.passcode,"r");
 						if (!fp) {
 							ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
@@ -266,7 +266,7 @@
 							ast_log(LOG_DEBUG, "Mailbox: %s\n",args.mailbox);
 
 							/* password must be in valid format (numeric) */
-							if (sscanf(args.passcode,"%d", &j) < 1)
+							if (sscanf(args.passcode,"%30d", &j) < 1)
 								continue;
 							 /* if we got it */
 							if (!strcmp(exten,args.passcode)) {

Modified: tags/1.4.26.1/apps/app_followme.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_followme.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_followme.c (original)
+++ tags/1.4.26.1/apps/app_followme.c Mon Aug 10 15:14:34 2009
@@ -315,7 +315,7 @@
 	featuredigittostr = ast_variable_retrieve(cfg, "general", "featuredigittimeout");
 	
 	if (!ast_strlen_zero(featuredigittostr)) {
-		if (!sscanf(featuredigittostr, "%d", &featuredigittimeout))
+		if (!sscanf(featuredigittostr, "%30d", &featuredigittimeout))
 			featuredigittimeout = 5000;
 	}
 

Modified: tags/1.4.26.1/apps/app_macro.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_macro.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_macro.c (original)
+++ tags/1.4.26.1/apps/app_macro.c Mon Aug 10 15:14:34 2009
@@ -220,18 +220,18 @@
 	/* does the user want a deeper rabbit hole? */
 	s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
 	if (s)
-		sscanf(s, "%d", &maxdepth);
+		sscanf(s, "%30d", &maxdepth);
 
 	/* Count how many levels deep the rabbit hole goes */
 	s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
 	if (s)
-		sscanf(s, "%d", &depth);
+		sscanf(s, "%30d", &depth);
 	/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
 	if (strcmp(chan->exten, "h") == 0)
 		pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
 	inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP");
 	if (!ast_strlen_zero(inhangupc))
-		sscanf(inhangupc, "%d", &inhangup);
+		sscanf(inhangupc, "%30d", &inhangup);
 
 	if (depth >= maxdepth) {
 		ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
@@ -511,7 +511,7 @@
 			if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {
 				/* Handle macro offset if it's set by checking the availability of step n + offset + 1, otherwise continue
 			   	normally if there is any problem */
-				if (sscanf(offsets, "%d", &offset) == 1) {
+				if (sscanf(offsets, "%30d", &offset) == 1) {
 					if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + offset + 1, chan->cid.cid_num)) {
 						chan->priority += offset;
 					}

Modified: tags/1.4.26.1/apps/app_meetme.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_meetme.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_meetme.c (original)
+++ tags/1.4.26.1/apps/app_meetme.c Mon Aug 10 15:14:34 2009
@@ -835,7 +835,7 @@
 	AST_LIST_INSERT_HEAD(&confs, cnf, list);
 
 	/* Reserve conference number in map */
-	if ((sscanf(cnf->confno, "%d", &confno_int) == 1) && (confno_int >= 0 && confno_int < 1024))
+	if ((sscanf(cnf->confno, "%30d", &confno_int) == 1) && (confno_int >= 0 && confno_int < 1024))
 		conf_map[confno_int] = 1;
 	
 cnfout:
@@ -1403,7 +1403,7 @@
 	AST_LIST_LOCK(&confs);
 	if (ast_atomic_dec_and_test(&conf->refcount)) {
 		/* Take the conference room number out of an inuse state */
-		if ((sscanf(conf->confno, "%d", &confno_int) == 1) && (confno_int >= 0 && confno_int < 1024))
+		if ((sscanf(conf->confno, "%30d", &confno_int) == 1) && (confno_int >= 0 && confno_int < 1024))
 			conf_map[confno_int] = 0;
 		conf_free(conf);
 		res = 1;
@@ -1537,7 +1537,7 @@
 	/* Possible timeout waiting for marked user */
 	if ((confflags & CONFFLAG_WAITMARKED) &&
 		!ast_strlen_zero(optargs[OPT_ARG_WAITMARKED]) &&
-		(sscanf(optargs[OPT_ARG_WAITMARKED], "%d", &opt_waitmarked_timeout) == 1) &&
+		(sscanf(optargs[OPT_ARG_WAITMARKED], "%30d", &opt_waitmarked_timeout) == 1) &&
 		(opt_waitmarked_timeout > 0)) {
 		timeout = time(NULL) + opt_waitmarked_timeout;
 	}
@@ -2794,7 +2794,7 @@
 				if (!res)
 					ast_waitstream(chan, "");
 			} else {
-				if (sscanf(confno, "%d", &confno_int) == 1) {
+				if (sscanf(confno, "%30d", &confno_int) == 1) {
 					res = ast_streamfile(chan, "conf-enteringno", chan->language);
 					if (!res) {
 						ast_waitstream(chan, "");
@@ -2917,7 +2917,7 @@
 	struct ast_conf_user *user = NULL;
 	int cid;
 	
-	sscanf(callerident, "%i", &cid);
+	sscanf(callerident, "%30i", &cid);
 	if (conf && callerident) {
 		AST_LIST_TRAVERSE(&conf->userlist, user, list) {
 			if (cid == user->user_no)
@@ -3251,7 +3251,7 @@
 		return;
 
 	if ((val = ast_variable_retrieve(cfg, "general", "audiobuffers"))) {
-		if ((sscanf(val, "%d", &audio_buffers) != 1)) {
+		if ((sscanf(val, "%30d", &audio_buffers) != 1)) {
 			ast_log(LOG_WARNING, "audiobuffers setting must be a number, not '%s'\n", val);
 			audio_buffers = DEFAULT_AUDIO_BUFFERS;
 		} else if ((audio_buffers < DAHDI_DEFAULT_NUM_BUFS) || (audio_buffers > DAHDI_MAX_NUM_BUFS)) {
@@ -4707,7 +4707,7 @@
 		if (!strcasecmp(var->name, "autocontext"))
 			ast_string_field_set(trunk, autocontext, var->value);
 		else if (!strcasecmp(var->name, "ringtimeout")) {
-			if (sscanf(var->value, "%u", &trunk->ring_timeout) != 1) {
+			if (sscanf(var->value, "%30u", &trunk->ring_timeout) != 1) {
 				ast_log(LOG_WARNING, "Invalid ringtimeout '%s' specified for trunk '%s'\n",
 					var->value, trunk->name);
 				trunk->ring_timeout = 0;
@@ -4783,13 +4783,13 @@
 		char *name, *value = cur;
 		name = strsep(&value, "=");
 		if (!strcasecmp(name, "ringtimeout")) {
-			if (sscanf(value, "%u", &trunk_ref->ring_timeout) != 1) {
+			if (sscanf(value, "%30u", &trunk_ref->ring_timeout) != 1) {
 				ast_log(LOG_WARNING, "Invalid ringtimeout value '%s' for "
 					"trunk '%s' on station '%s'\n", value, trunk->name, station->name);
 				trunk_ref->ring_timeout = 0;
 			}
 		} else if (!strcasecmp(name, "ringdelay")) {
-			if (sscanf(value, "%u", &trunk_ref->ring_delay) != 1) {
+			if (sscanf(value, "%30u", &trunk_ref->ring_delay) != 1) {
 				ast_log(LOG_WARNING, "Invalid ringdelay value '%s' for "
 					"trunk '%s' on station '%s'\n", value, trunk->name, station->name);
 				trunk_ref->ring_delay = 0;
@@ -4838,13 +4838,13 @@
 		else if (!strcasecmp(var->name, "autocontext"))
 			ast_string_field_set(station, autocontext, var->value);
 		else if (!strcasecmp(var->name, "ringtimeout")) {
-			if (sscanf(var->value, "%u", &station->ring_timeout) != 1) {
+			if (sscanf(var->value, "%30u", &station->ring_timeout) != 1) {
 				ast_log(LOG_WARNING, "Invalid ringtimeout '%s' specified for station '%s'\n",
 					var->value, station->name);
 				station->ring_timeout = 0;
 			}
 		} else if (!strcasecmp(var->name, "ringdelay")) {
-			if (sscanf(var->value, "%u", &station->ring_delay) != 1) {
+			if (sscanf(var->value, "%30u", &station->ring_delay) != 1) {
 				ast_log(LOG_WARNING, "Invalid ringdelay '%s' specified for station '%s'\n",
 					var->value, station->name);
 				station->ring_delay = 0;

Modified: tags/1.4.26.1/apps/app_mixmonitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_mixmonitor.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_mixmonitor.c (original)
+++ tags/1.4.26.1/apps/app_mixmonitor.c Mon Aug 10 15:14:34 2009
@@ -451,7 +451,7 @@
 		if (ast_test_flag(&flags, MUXFLAG_READVOLUME)) {
 			if (ast_strlen_zero(opts[OPT_ARG_READVOLUME])) {
 				ast_log(LOG_WARNING, "No volume level was provided for the heard volume ('v') option.\n");
-			} else if ((sscanf(opts[OPT_ARG_READVOLUME], "%d", &x) != 1) || (x < -4) || (x > 4)) {
+			} else if ((sscanf(opts[OPT_ARG_READVOLUME], "%2d", &x) != 1) || (x < -4) || (x > 4)) {
 				ast_log(LOG_NOTICE, "Heard volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_READVOLUME]);
 			} else {
 				readvol = get_volfactor(x);
@@ -461,7 +461,7 @@
 		if (ast_test_flag(&flags, MUXFLAG_WRITEVOLUME)) {
 			if (ast_strlen_zero(opts[OPT_ARG_WRITEVOLUME])) {
 				ast_log(LOG_WARNING, "No volume level was provided for the spoken volume ('V') option.\n");
-			} else if ((sscanf(opts[OPT_ARG_WRITEVOLUME], "%d", &x) != 1) || (x < -4) || (x > 4)) {
+			} else if ((sscanf(opts[OPT_ARG_WRITEVOLUME], "%2d", &x) != 1) || (x < -4) || (x > 4)) {
 				ast_log(LOG_NOTICE, "Spoken volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_WRITEVOLUME]);
 			} else {
 				writevol = get_volfactor(x);
@@ -471,7 +471,7 @@
 		if (ast_test_flag(&flags, MUXFLAG_VOLUME)) {
 			if (ast_strlen_zero(opts[OPT_ARG_VOLUME])) {
 				ast_log(LOG_WARNING, "No volume level was provided for the combined volume ('W') option.\n");
-			} else if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &x) != 1) || (x < -4) || (x > 4)) {
+			} else if ((sscanf(opts[OPT_ARG_VOLUME], "%2d", &x) != 1) || (x < -4) || (x > 4)) {
 				ast_log(LOG_NOTICE, "Combined volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_VOLUME]);
 			} else {
 				readvol = writevol = get_volfactor(x);

Modified: tags/1.4.26.1/apps/app_morsecode.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_morsecode.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_morsecode.c (original)
+++ tags/1.4.26.1/apps/app_morsecode.c Mon Aug 10 15:14:34 2009
@@ -123,13 +123,13 @@
 
 	/* Use variable MORESEDITLEN, if set (else 80) */
 	ditlenc = pbx_builtin_getvar_helper(chan, "MORSEDITLEN");
-	if (ast_strlen_zero(ditlenc) || (sscanf(ditlenc, "%d", &ditlen) != 1)) {
+	if (ast_strlen_zero(ditlenc) || (sscanf(ditlenc, "%30d", &ditlen) != 1)) {
 		ditlen = 80;
 	}
 
 	/* Use variable MORSETONE, if set (else 800) */
 	tonec = pbx_builtin_getvar_helper(chan, "MORSETONE");
-	if (ast_strlen_zero(tonec) || (sscanf(tonec, "%d", &tone) != 1)) {
+	if (ast_strlen_zero(tonec) || (sscanf(tonec, "%30d", &tone) != 1)) {
 		tone = 800;
 	}
 

Modified: tags/1.4.26.1/apps/app_osplookup.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_osplookup.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_osplookup.c (original)
+++ tags/1.4.26.1/apps/app_osplookup.c Mon Aug 10 15:14:34 2009
@@ -208,7 +208,7 @@
 				ast_log(LOG_WARNING, "OSP: Too many Service Points at line %d\n", v->lineno);
 			}
 		} else if (!strcasecmp(v->name, "maxconnections")) {
-			if ((sscanf(v->value, "%d", &t) == 1) && (t >= OSP_MIN_MAXCONNECTIONS) && (t <= OSP_MAX_MAXCONNECTIONS)) {
+			if ((sscanf(v->value, "%30d", &t) == 1) && (t >= OSP_MIN_MAXCONNECTIONS) && (t <= OSP_MAX_MAXCONNECTIONS)) {
 				p->maxconnections = t;
 				ast_log(LOG_DEBUG, "OSP: maxconnections '%d'\n", t);
 			} else {
@@ -216,7 +216,7 @@
 					OSP_MIN_MAXCONNECTIONS, OSP_MAX_MAXCONNECTIONS, v->value, v->lineno);
 			}
 		} else if (!strcasecmp(v->name, "retrydelay")) {
-			if ((sscanf(v->value, "%d", &t) == 1) && (t >= OSP_MIN_RETRYDELAY) && (t <= OSP_MAX_RETRYDELAY)) {
+			if ((sscanf(v->value, "%30d", &t) == 1) && (t >= OSP_MIN_RETRYDELAY) && (t <= OSP_MAX_RETRYDELAY)) {
 				p->retrydelay = t;
 				ast_log(LOG_DEBUG, "OSP: retrydelay '%d'\n", t);
 			} else {
@@ -224,7 +224,7 @@
 					OSP_MIN_RETRYDELAY, OSP_MAX_RETRYDELAY, v->value, v->lineno);
 			}
 		} else if (!strcasecmp(v->name, "retrylimit")) {
-			if ((sscanf(v->value, "%d", &t) == 1) && (t >= OSP_MIN_RETRYLIMIT) && (t <= OSP_MAX_RETRYLIMIT)) {
+			if ((sscanf(v->value, "%30d", &t) == 1) && (t >= OSP_MIN_RETRYLIMIT) && (t <= OSP_MAX_RETRYLIMIT)) {
 				p->retrylimit = t;
 				ast_log(LOG_DEBUG, "OSP: retrylimit '%d'\n", t);
 			} else {
@@ -232,7 +232,7 @@
 					OSP_MIN_RETRYLIMIT, OSP_MAX_RETRYLIMIT, v->value, v->lineno);
 			}
 		} else if (!strcasecmp(v->name, "timeout")) {
-			if ((sscanf(v->value, "%d", &t) == 1) && (t >= OSP_MIN_TIMEOUT) && (t <= OSP_MAX_TIMEOUT)) {
+			if ((sscanf(v->value, "%30d", &t) == 1) && (t >= OSP_MIN_TIMEOUT) && (t <= OSP_MAX_TIMEOUT)) {
 				p->timeout = t;
 				ast_log(LOG_DEBUG, "OSP: timeout '%d'\n", t);
 			} else {
@@ -243,7 +243,7 @@
 			ast_copy_string(p->source, v->value, sizeof(p->source));
 			ast_log(LOG_DEBUG, "OSP: source '%s'\n", p->source);
 		} else if (!strcasecmp(v->name, "authpolicy")) {
-			if ((sscanf(v->value, "%d", &t) == 1) && ((t == OSP_AUTH_NO) || (t == OSP_AUTH_YES) || (t == OSP_AUTH_EXCLUSIVE))) {
+			if ((sscanf(v->value, "%30d", &t) == 1) && ((t == OSP_AUTH_NO) || (t == OSP_AUTH_YES) || (t == OSP_AUTH_EXCLUSIVE))) {
 				p->authpolicy = t;
 				ast_log(LOG_DEBUG, "OSP: authpolicy '%d'\n", t);
 			} else {
@@ -1051,11 +1051,11 @@
 	headp = &chan->varshead;
 	AST_LIST_TRAVERSE(headp, current, entries) {
 		if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
-			if (sscanf(ast_var_value(current), "%d", &result.inhandle) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &result.inhandle) != 1) {
 				result.inhandle = OSP_INVALID_HANDLE;
 			}
 		} else if (!strcasecmp(ast_var_name(current), "OSPINTIMELIMIT")) {
-			if (sscanf(ast_var_value(current), "%d", &result.intimelimit) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &result.intimelimit) != 1) {
 				result.intimelimit = OSP_DEF_TIMELIMIT;
 			}
 		} else if (!strcasecmp(ast_var_name(current), "OSPPEERIP")) {
@@ -1177,7 +1177,7 @@
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
-	if (!ast_strlen_zero(args.cause) && sscanf(args.cause, "%d", &cause) != 1) {
+	if (!ast_strlen_zero(args.cause) && sscanf(args.cause, "%30d", &cause) != 1) {
 		cause = 0;
 	}
 	ast_log(LOG_DEBUG, "OSPNext: cause '%d'\n", cause);
@@ -1195,19 +1195,19 @@
 	headp = &chan->varshead;
 	AST_LIST_TRAVERSE(headp, current, entries) {
 		if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
-			if (sscanf(ast_var_value(current), "%d", &result.inhandle) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &result.inhandle) != 1) {
 				result.inhandle = OSP_INVALID_HANDLE;
 			}
 		} else if (!strcasecmp(ast_var_name(current), "OSPOUTHANDLE")) {
-			if (sscanf(ast_var_value(current), "%d", &result.outhandle) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &result.outhandle) != 1) {
 				result.outhandle = OSP_INVALID_HANDLE;
 			}
 		} else if (!strcasecmp(ast_var_name(current), "OSPINTIMELIMIT")) {
-			if (sscanf(ast_var_value(current), "%d", &result.intimelimit) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &result.intimelimit) != 1) {
 				result.intimelimit = OSP_DEF_TIMELIMIT;
 			}
 		} else if (!strcasecmp(ast_var_name(current), "OSPRESULTS")) {
-			if (sscanf(ast_var_value(current), "%d", &result.numresults) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &result.numresults) != 1) {
 				result.numresults = 0;
 			}
 		}
@@ -1322,11 +1322,11 @@
 	headp = &chan->varshead;
 	AST_LIST_TRAVERSE(headp, current, entries) {
 		if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
-			if (sscanf(ast_var_value(current), "%d", &inhandle) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &inhandle) != 1) {
 				inhandle = OSP_INVALID_HANDLE;
 			}
 		} else if (!strcasecmp(ast_var_name(current), "OSPOUTHANDLE")) {
-			if (sscanf(ast_var_value(current), "%d", &outhandle) != 1) {
+			if (sscanf(ast_var_value(current), "%30d", &outhandle) != 1) {
 				outhandle = OSP_INVALID_HANDLE;
 			}
 		} else if (!recorded &&
@@ -1343,7 +1343,7 @@
 	ast_log(LOG_DEBUG, "OSPFinish: OSPOUTHANDLE '%d'\n", outhandle);
 	ast_log(LOG_DEBUG, "OSPFinish: recorded '%d'\n", recorded);
 
-	if (!ast_strlen_zero(args.cause) && sscanf(args.cause, "%d", &cause) != 1) {
+	if (!ast_strlen_zero(args.cause) && sscanf(args.cause, "%30d", &cause) != 1) {
 		cause = 0;
 	}
 	ast_log(LOG_DEBUG, "OSPFinish: cause '%d'\n", cause);
@@ -1435,7 +1435,7 @@
 
 		t = ast_variable_retrieve(cfg, OSP_GENERAL_CAT, "tokenformat");
 		if (t) {
-			if ((sscanf(t, "%d", &v) == 1) && 
+			if ((sscanf(t, "%30d", &v) == 1) && 
 				((v == TOKEN_ALGO_SIGNED) || (v == TOKEN_ALGO_UNSIGNED) || (v == TOKEN_ALGO_BOTH))) 
 			{
 				osp_tokenformat = v;

Modified: tags/1.4.26.1/apps/app_privacy.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_privacy.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_privacy.c (original)
+++ tags/1.4.26.1/apps/app_privacy.c Mon Aug 10 15:14:34 2009
@@ -115,13 +115,13 @@
 			AST_STANDARD_APP_ARGS(args, parse);
 
 			if (args.maxretries) {
-				if (sscanf(args.maxretries, "%d", &x) == 1)
+				if (sscanf(args.maxretries, "%30d", &x) == 1)
 					maxretries = x;
 				else
 					ast_log(LOG_WARNING, "Invalid max retries argument\n");
 			}
 			if (args.minlength) {
-				if (sscanf(args.minlength, "%d", &x) == 1)
+				if (sscanf(args.minlength, "%30d", &x) == 1)
 					minlength = x;
 				else
 					ast_log(LOG_WARNING, "Invalid min length argument\n");
@@ -138,14 +138,14 @@
 			cfg = ast_config_load(PRIV_CONFIG);
 		
 			if (cfg && (s = ast_variable_retrieve(cfg, "general", "maxretries"))) {
-				if (sscanf(s, "%d", &x) == 1) 
+				if (sscanf(s, "%30d", &x) == 1) 
 					maxretries = x;
 				else
 					ast_log(LOG_WARNING, "Invalid max retries argument\n");
         		}
 
 			if (cfg && (s = ast_variable_retrieve(cfg, "general", "minlength"))) {
-				if (sscanf(s, "%d", &x) == 1) 
+				if (sscanf(s, "%30d", &x) == 1) 
 					minlength = x;
 				else
 					ast_log(LOG_WARNING, "Invalid min length argument\n");

Modified: tags/1.4.26.1/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_queue.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_queue.c (original)
+++ tags/1.4.26.1/apps/app_queue.c Mon Aug 10 15:14:34 2009
@@ -3822,7 +3822,7 @@
 	}
 
 	if (!ast_strlen_zero(args.penalty)) {
-		if ((sscanf(args.penalty, "%d", &penalty) != 1) || penalty < 0) {
+		if ((sscanf(args.penalty, "%30d", &penalty) != 1) || penalty < 0) {
 			ast_log(LOG_WARNING, "Penalty '%s' is invalid, must be an integer >= 0\n", args.penalty);
 			penalty = 0;
 		}
@@ -3961,7 +3961,7 @@
 	/* Get the priority from the variable ${QUEUE_PRIO} */
 	user_priority = pbx_builtin_getvar_helper(chan, "QUEUE_PRIO");
 	if (user_priority) {
-		if (sscanf(user_priority, "%d", &prio) == 1) {
+		if (sscanf(user_priority, "%30d", &prio) == 1) {
 			if (option_debug)
 				ast_log(LOG_DEBUG, "%s: Got priority %d from ${QUEUE_PRIO}.\n",
 					chan->name, prio);
@@ -3978,7 +3978,7 @@
 
 	/* Get the maximum penalty from the variable ${QUEUE_MAX_PENALTY} */
 	if ((max_penalty_str = pbx_builtin_getvar_helper(chan, "QUEUE_MAX_PENALTY"))) {
-		if (sscanf(max_penalty_str, "%d", &max_penalty) == 1) {
+		if (sscanf(max_penalty_str, "%30d", &max_penalty) == 1) {
 			if (option_debug)
 				ast_log(LOG_DEBUG, "%s: Got max penalty %d from ${QUEUE_MAX_PENALTY}.\n",
 					chan->name, max_penalty);
@@ -4862,7 +4862,7 @@
 
 	if (ast_strlen_zero(penalty_s))
 		penalty = 0;
-	else if (sscanf(penalty_s, "%d", &penalty) != 1 || penalty < 0)
+	else if (sscanf(penalty_s, "%30d", &penalty) != 1 || penalty < 0)
 		penalty = 0;
 
 	if (ast_strlen_zero(paused_s))
@@ -4966,7 +4966,7 @@
 	queuename = argv[5];
 	interface = argv[3];
 	if (argc >= 8) {
-		if (sscanf(argv[7], "%d", &penalty) == 1) {
+		if (sscanf(argv[7], "%30d", &penalty) == 1) {
 			if (penalty < 0) {
 				ast_cli(fd, "Penalty must be >= 0\n");
 				penalty = 0;

Modified: tags/1.4.26.1/apps/app_random.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_random.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_random.c (original)
+++ tags/1.4.26.1/apps/app_random.c Mon Aug 10 15:14:34 2009
@@ -71,7 +71,7 @@
 	s = ast_strdupa(data);
 
 	prob = strsep(&s,":");
-	if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
+	if ((!prob) || (sscanf(prob, "%30d", &probint) != 1))
 		probint = 0;
 
 	if (!deprecated) {

Modified: tags/1.4.26.1/apps/app_readfile.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_readfile.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_readfile.c (original)
+++ tags/1.4.26.1/apps/app_readfile.c Mon Aug 10 15:14:34 2009
@@ -80,7 +80,7 @@
 	}
 
 	if (length) {
-		if ((sscanf(length, "%d", &len) != 1) || (len < 0)) {
+		if ((sscanf(length, "%30d", &len) != 1) || (len < 0)) {
 			ast_log(LOG_WARNING, "%s is not a positive number, defaulting length to max\n", length);
 			len = 0;
 		}

Modified: tags/1.4.26.1/apps/app_record.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_record.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_record.c (original)
+++ tags/1.4.26.1/apps/app_record.c Mon Aug 10 15:14:34 2009
@@ -140,7 +140,7 @@
 		return -1;
 	}
 	if (silstr) {
-		if ((sscanf(silstr, "%d", &i) == 1) && (i > -1)) {
+		if ((sscanf(silstr, "%30d", &i) == 1) && (i > -1)) {
 			silence = i * 1000;
 		} else if (!ast_strlen_zero(silstr)) {
 			ast_log(LOG_WARNING, "'%s' is not a valid silence duration\n", silstr);
@@ -148,7 +148,7 @@
 	}
 	
 	if (maxstr) {
-		if ((sscanf(maxstr, "%d", &i) == 1) && (i > -1))
+		if ((sscanf(maxstr, "%30d", &i) == 1) && (i > -1))
 			/* Convert duration to milliseconds */
 			maxduration = i * 1000;
 		else if (!ast_strlen_zero(maxstr))

Modified: tags/1.4.26.1/apps/app_rpt.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_rpt.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_rpt.c (original)
+++ tags/1.4.26.1/apps/app_rpt.c Mon Aug 10 15:14:34 2009
@@ -1522,7 +1522,7 @@
 
 	if (str == NULL) return -1;
 	/* leave this %i alone, non-base-10 input is useful here */
-	if (sscanf(str,"%i",&ret) != 1) return -1;
+	if (sscanf(str,"%30i",&ret) != 1) return -1;
 	return ret;
 }
 
@@ -1697,7 +1697,7 @@
 	/* do not use atoi() here, we need to be able to have
 		the input specified in hex or decimal so we use
 		sscanf with a %i */
-	if ((!val) || (sscanf(val,"%i",&rpt_vars[n].p.iobase) != 1))
+	if ((!val) || (sscanf(val,"%30i",&rpt_vars[n].p.iobase) != 1))
 	rpt_vars[n].p.iobase = DEFAULT_IOBASE;
 	val = (char *) ast_variable_retrieve(cfg,this,"ioport");
 	rpt_vars[n].p.ioport = val;
@@ -2641,7 +2641,7 @@
 		tonesubset = strsep(&stringp,")");
 		if(!tonesubset)
 			break;
-		if(sscanf(tonesubset,"(%d,%d,%d,%d", &f1, &f2, &duration, &amplitude) != 4)
+		if(sscanf(tonesubset,"(%30d,%30d,%30d,%30d", &f1, &f2, &duration, &amplitude) != 4)
 			break;
 		res = play_tone_pair(chan, f1, f2, duration, amplitude);
 		if(res)
@@ -3983,7 +3983,7 @@
 		p = strstr(tdesc, "version");	
 		if(!p)
 			break;	
-		if(sscanf(p, "version %d.%d", &vmajor, &vminor) != 2)
+		if(sscanf(p, "version %30d.%30d", &vmajor, &vminor) != 2)
 			break;
     		wait_interval(myrpt, DLY_TELEM, mychannel); /* Wait a little bit */
 		/* Say "version" */
@@ -5303,6 +5303,8 @@
 static void handle_link_data(struct rpt *myrpt, struct rpt_link *mylink,
 	char *str)
 {
+/* XXX ATTENTION: if you change the size of these arrays you MUST
+ * change the limits in corresponding sscanf() calls below. */
 char	tmp[512],cmd[300] = "",dest[300],src[300],c;
 int	seq, res;
 struct rpt_link *l;
@@ -5336,7 +5338,9 @@
 	}
 	if (tmp[0] == 'I')
 	{
-		if (sscanf(tmp,"%s %s %x",cmd,src,&seq) != 3)
+		/* XXX WARNING: be very careful with the limits on the folowing
+		 * sscanf() call, make sure they match the values defined above */
+		if (sscanf(tmp,"%299s %299s %30x",cmd,src,&seq) != 3)
 		{
 			ast_log(LOG_WARNING, "Unable to parse ident string %s\n",str);
 			return;
@@ -5346,7 +5350,9 @@
 	}
 	else
 	{
-		if (sscanf(tmp,"%s %s %s %d %c",cmd,dest,src,&seq,&c) != 5)
+		/* XXX WARNING: be very careful with the limits on the folowing
+		 * sscanf() call, make sure they match the values defined above */
+		if (sscanf(tmp,"%299s %299s %299s %30d %1c",cmd,dest,src,&seq,&c) != 5)
 		{
 			ast_log(LOG_WARNING, "Unable to parse link string %s\n",str);
 			return;
@@ -8332,6 +8338,8 @@
 
 static int handle_remote_data(struct rpt *myrpt, char *str)
 {
+/* XXX ATTENTION: if you change the size of these arrays you MUST
+ * change the limits in corresponding sscanf() calls below. */
 char	tmp[300],cmd[300],dest[300],src[300],c;
 int	seq,res;
 
@@ -8342,7 +8350,9 @@
 #ifndef	DO_NOT_NOTIFY_MDC1200_ON_REMOTE_BASES
 	if (tmp[0] == 'I')
 	{
-		if (sscanf(tmp,"%s %s %x",cmd,src,&seq) != 3)
+		/* XXX WARNING: be very careful with the limits on the folowing
+		 * sscanf() call, make sure they match the values defined above */
+		if (sscanf(tmp,"%299s %299s %30x",cmd,src,&seq) != 3)
 		{
 			ast_log(LOG_WARNING, "Unable to parse ident string %s\n",str);
 			return 0;
@@ -8351,7 +8361,9 @@
 		return 0;
 	}
 #endif
-	if (sscanf(tmp,"%s %s %s %d %c",cmd,dest,src,&seq,&c) != 5)
+	/* XXX WARNING: be very careful with the limits on the folowing
+	 * sscanf() call, make sure they match the values defined above */
+	if (sscanf(tmp,"%299s %299s %299s %30d %1c",cmd,dest,src,&seq,&c) != 5)
 	{
 		ast_log(LOG_WARNING, "Unable to parse link string %s\n",str);
 		return 0;

Modified: tags/1.4.26.1/apps/app_setcallerid.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_setcallerid.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_setcallerid.c (original)
+++ tags/1.4.26.1/apps/app_setcallerid.c Mon Aug 10 15:14:34 2009
@@ -72,7 +72,7 @@
 	u = ast_module_user_add(chan);
 
 	/* For interface consistency, permit the argument to be specified as a number */
-	if (sscanf(data, "%d", &pres) != 1 || pres < 0 || pres > 255 || (pres & 0x9c)) {
+	if (sscanf(data, "%30d", &pres) != 1 || pres < 0 || pres > 255 || (pres & 0x9c)) {
 		pres = ast_parse_caller_presentation(data);
 	}
 

Modified: tags/1.4.26.1/apps/app_sms.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_sms.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_sms.c (original)
+++ tags/1.4.26.1/apps/app_sms.c Mon Aug 10 15:14:34 2009
@@ -747,7 +747,7 @@
 						  H,
 						  M,
 						  S;
-						if (sscanf (p, "%d-%d-%dT%d:%d:%d", &Y, &m, &d, &H, &M, &S) == 6)
+						if (sscanf (p, "%30d-%30d-%30dT%30d:%30d:%30d", &Y, &m, &d, &H, &M, &S) == 6)
 						{
 							struct tm t;
 							t.tm_year = Y - 1900;

Modified: tags/1.4.26.1/apps/app_talkdetect.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_talkdetect.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_talkdetect.c (original)
+++ tags/1.4.26.1/apps/app_talkdetect.c Mon Aug 10 15:14:34 2009
@@ -89,15 +89,15 @@
 	strsep(&stringp, "|");
 	options = strsep(&stringp, "|");
 	if (options) {
-		if ((sscanf(options, "%d", &x) == 1) && (x > 0))
+		if ((sscanf(options, "%30d", &x) == 1) && (x > 0))
 			sil = x;
 		options = strsep(&stringp, "|");
 		if (options) {
-			if ((sscanf(options, "%d", &x) == 1) && (x > 0))
+			if ((sscanf(options, "%30d", &x) == 1) && (x > 0))
 				min = x;
 			options = strsep(&stringp, "|");
 			if (options) {
-				if ((sscanf(options, "%d", &x) == 1) && (x > 0))
+				if ((sscanf(options, "%30d", &x) == 1) && (x > 0))
 					max = x;
 			}
 		}

Modified: tags/1.4.26.1/apps/app_verbose.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_verbose.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_verbose.c (original)
+++ tags/1.4.26.1/apps/app_verbose.c Mon Aug 10 15:14:34 2009
@@ -65,7 +65,7 @@
 		vtext = ast_strdupa(data);
 		tmp = strsep(&vtext, "|");
 		if (vtext) {
-			if (sscanf(tmp, "%d", &vsize) != 1) {
+			if (sscanf(tmp, "%30d", &vsize) != 1) {
 				vsize = 0;
 				ast_log(LOG_WARNING, "'%s' is not a verboser number\n", vtext);
 			}

Modified: tags/1.4.26.1/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/tags/1.4.26.1/apps/app_voicemail.c?view=diff&rev=211596&r1=211595&r2=211596
==============================================================================
--- tags/1.4.26.1/apps/app_voicemail.c (original)

[... 2150 lines stripped ...]



More information about the asterisk-commits mailing list