[asterisk-commits] tilghman: branch 1.2 r211526 - in /branches/1.2: ./ apps/ channels/ codecs/ f...

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


Author: tilghman
Date: Mon Aug 10 14:12:35 2009
New Revision: 211526

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=211526
Log:
AST-2009-005

Modified:
    branches/1.2/   (props changed)
    branches/1.2/Makefile
    branches/1.2/acl.c
    branches/1.2/apps/app_adsiprog.c
    branches/1.2/apps/app_alarmreceiver.c
    branches/1.2/apps/app_chanspy.c
    branches/1.2/apps/app_cut.c
    branches/1.2/apps/app_dial.c
    branches/1.2/apps/app_disa.c
    branches/1.2/apps/app_groupcount.c
    branches/1.2/apps/app_macro.c
    branches/1.2/apps/app_math.c
    branches/1.2/apps/app_meetme.c
    branches/1.2/apps/app_mixmonitor.c
    branches/1.2/apps/app_osplookup.c
    branches/1.2/apps/app_privacy.c
    branches/1.2/apps/app_queue.c
    branches/1.2/apps/app_random.c
    branches/1.2/apps/app_readfile.c
    branches/1.2/apps/app_record.c
    branches/1.2/apps/app_sayunixtime.c
    branches/1.2/apps/app_sms.c
    branches/1.2/apps/app_talkdetect.c
    branches/1.2/apps/app_verbose.c
    branches/1.2/apps/app_voicemail.c
    branches/1.2/apps/app_waitforring.c
    branches/1.2/apps/app_waitforsilence.c
    branches/1.2/apps/app_zapbarge.c
    branches/1.2/asterisk.c
    branches/1.2/cdr.c
    branches/1.2/channel.c
    branches/1.2/channels/chan_agent.c
    branches/1.2/channels/chan_h323.c
    branches/1.2/channels/chan_iax2.c
    branches/1.2/channels/chan_mgcp.c
    branches/1.2/channels/chan_misdn.c
    branches/1.2/channels/chan_modem.c
    branches/1.2/channels/chan_phone.c
    branches/1.2/channels/chan_sip.c
    branches/1.2/channels/chan_skinny.c
    branches/1.2/channels/chan_vpb.c
    branches/1.2/channels/chan_zap.c
    branches/1.2/channels/iax2-provision.c
    branches/1.2/channels/misdn_config.c
    branches/1.2/cli.c
    branches/1.2/codecs/codec_speex.c
    branches/1.2/dnsmgr.c
    branches/1.2/frame.c
    branches/1.2/funcs/func_math.c
    branches/1.2/funcs/func_strings.c
    branches/1.2/indications.c
    branches/1.2/manager.c
    branches/1.2/muted.c
    branches/1.2/pbx.c
    branches/1.2/pbx/dundi-parser.c
    branches/1.2/pbx/pbx_config.c
    branches/1.2/pbx/pbx_dundi.c
    branches/1.2/pbx/pbx_loopback.c
    branches/1.2/pbx/pbx_spool.c
    branches/1.2/res/res_agi.c
    branches/1.2/res/res_features.c
    branches/1.2/res/res_osp.c
    branches/1.2/utils/frame.c

Propchange: branches/1.2/
------------------------------------------------------------------------------
    automerge = *

Propchange: branches/1.2/
------------------------------------------------------------------------------
    automerge-email = tilghman at mail.jeffandtilghman.com

Propchange: branches/1.2/
------------------------------------------------------------------------------
    svnmerge-integrated = /branches/1.2:1-209600

Modified: branches/1.2/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/Makefile?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Mon Aug 10 14:12:35 2009
@@ -140,7 +140,7 @@
   AGI_DIR=$(ASTVARLIBDIR)/agi-bin
 endif
 
-ASTCFLAGS=
+ASTCFLAGS=-Wformat-security
 
 # Pentium Pro Optimize
 #PROC=i686

Modified: branches/1.2/acl.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/acl.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/acl.c (original)
+++ branches/1.2/acl.c Mon Aug 10 14:12:35 2009
@@ -165,7 +165,7 @@
 			nm++;
 		}
 		if (!strchr(nm, '.')) {
-			if ((sscanf(nm, "%d", &x) == 1) && (x >= 0) && (x <= 32)) {
+			if ((sscanf(nm, "%30d", &x) == 1) && (x >= 0) && (x <= 32)) {
 				y = 0;
 				for (z=0;z<x;z++) {
 					y >>= 1;
@@ -250,7 +250,7 @@
 int ast_str2tos(const char *value, int *tos)
 {
 	int fval;
-	if (sscanf(value, "%i", &fval) == 1)
+	if (sscanf(value, "%30i", &fval) == 1)
 		*tos = fval & 0xff;
 	else if (!strcasecmp(value, "lowdelay"))
 		*tos = IPTOS_LOWDELAY;

Modified: branches/1.2/apps/app_adsiprog.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_adsiprog.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_adsiprog.c (original)
+++ branches/1.2/apps/app_adsiprog.c Mon Aug 10 14:12:35 2009
@@ -194,7 +194,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 */
@@ -204,7 +204,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 */
@@ -214,7 +214,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: branches/1.2/apps/app_alarmreceiver.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_alarmreceiver.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_alarmreceiver.c (original)
+++ branches/1.2/apps/app_alarmreceiver.c Mon Aug 10 14:12:35 2009
@@ -134,7 +134,7 @@
 		return;
 	}
 	
-	sscanf(value, "%u", &v);
+	sscanf(value, "%30u", &v);
 	v++;
 	
 	if(option_verbose >= 4)

Modified: branches/1.2/apps/app_chanspy.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_chanspy.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_chanspy.c (original)
+++ branches/1.2/apps/app_chanspy.c Mon Aug 10 14:12:35 2009
@@ -426,7 +426,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: branches/1.2/apps/app_cut.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_cut.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_cut.c (original)
+++ branches/1.2/apps/app_cut.c Mon Aug 10 14:12:35 2009
@@ -134,7 +134,7 @@
 		*ptrvalue = '\0';
 		ptrvalue++;
 		sortable_keys[count2].key = ptrkey;
-		sscanf(ptrvalue, "%f", &sortable_keys[count2].value);
+		sscanf(ptrvalue, "%30f", &sortable_keys[count2].value);
 		count2++;
 	}
 
@@ -206,15 +206,15 @@
 				int num1 = 0, num2 = MAXRESULT;
 				char trashchar;
 
-				if (sscanf(nextgroup, "%d-%d", &num1, &num2) == 2) {
+				if (sscanf(nextgroup, "%30d-%30d", &num1, &num2) == 2) {
 					/* range with both start and end */
-				} else if (sscanf(nextgroup, "-%d", &num2) == 1) {
+				} else if (sscanf(nextgroup, "-%30d", &num2) == 1) {
 					/* range with end */
 					num1 = 0;
-				} else if ((sscanf(nextgroup, "%d%c", &num1, &trashchar) == 2) && (trashchar == '-')) {
+				} else if ((sscanf(nextgroup, "%30d%1c", &num1, &trashchar) == 2) && (trashchar == '-')) {
 					/* range with start */
 					num2 = MAXRESULT;
-				} else if (sscanf(nextgroup, "%d", &num1) == 1) {
+				} else if (sscanf(nextgroup, "%30d", &num1) == 1) {
 					/* single number */
 					num2 = num1;
 				} else {

Modified: branches/1.2/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_dial.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_dial.c (original)
+++ branches/1.2/apps/app_dial.c Mon Aug 10 14:12:35 2009
@@ -1706,7 +1706,7 @@
 	if ((dialdata = strchr(announce, '|'))) {
 		*dialdata = '\0';
 		dialdata++;
-		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);
@@ -1716,7 +1716,7 @@
 		if ((dialdata = strchr(dialdata, '|'))) {
 			*dialdata = '\0';
 			dialdata++;
-			if (sscanf(dialdata, "%d", &loops) != 1) {
+			if (sscanf(dialdata, "%30d", &loops) != 1) {
 				ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp);
 				LOCAL_USER_REMOVE(u);
 				return -1;

Modified: branches/1.2/apps/app_disa.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_disa.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_disa.c (original)
+++ branches/1.2/apps/app_disa.c Mon Aug 10 14:12:35 2009
@@ -249,7 +249,7 @@
 				if (j == '#') /* end of password */
 				{
 					  /* see if this is an integer */
-					if (sscanf(args.passcode,"%d",&j) < 1)
+					if (sscanf(args.passcode,"%30d",&j) < 1)
 					   { /* nope, it must be a filename */
 						fp = fopen(args.passcode,"r");
 						if (!fp)
@@ -274,7 +274,7 @@
 							ast_log(LOG_DEBUG, "Mailbox: %s\n",args.mailbox);
 
 							  /* password must be in valid format (numeric) */
-							if (sscanf(args.passcode,"%d",&j) < 1) continue;
+							if (sscanf(args.passcode,"%30d",&j) < 1) continue;
 							  /* if we got it */
 							if (!strcmp(exten,args.passcode)) {
 								if (ast_strlen_zero(args.context))

Modified: branches/1.2/apps/app_groupcount.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_groupcount.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_groupcount.c (original)
+++ branches/1.2/apps/app_groupcount.c Mon Aug 10 14:12:35 2009
@@ -180,7 +180,7 @@
 
   	ast_app_group_split_group(args.max, limit, sizeof(limit), category, sizeof(category));
 
- 	if ((sscanf(limit, "%d", &max) == 1) && (max > -1)) {
+ 	if ((sscanf(limit, "%30d", &max) == 1) && (max > -1)) {
 		count = ast_app_group_get_count(pbx_builtin_getvar_helper(chan, category), category);
 		if (count > max) {
 			pbx_builtin_setvar_helper(chan, "CHECKGROUPSTATUS", "OVERMAX");

Modified: branches/1.2/apps/app_macro.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_macro.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_macro.c (original)
+++ branches/1.2/apps/app_macro.c Mon Aug 10 14:12:35 2009
@@ -169,12 +169,12 @@
 	/* does the user want a deeper rabbit hole? */
 	s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
 	if (s)
-		sscanf(s, "%d", &maxdepth);
+		sscanf(s, "%3d", &maxdepth);
 
 	/* Count how many levels deep the rabbit hole goes */
 	tmp = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
 	if (tmp) {
-		sscanf(tmp, "%d", &depth);
+		sscanf(tmp, "%3d", &depth);
 	} else {
 		depth = 0;
 	}
@@ -184,7 +184,7 @@
 		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, "%3d", &inhangup);
 
 	if (depth >= maxdepth) {
 		ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
@@ -442,7 +442,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: branches/1.2/apps/app_math.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_math.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_math.c (original)
+++ branches/1.2/apps/app_math.c Mon Aug 10 14:12:35 2009
@@ -181,13 +181,13 @@
 		return -1;
 	}
 
-	if (sscanf(mvalue1, "%f", &fnum1) != 1) {
+	if (sscanf(mvalue1, "%30f", &fnum1) != 1) {
 		ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue1);
 		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
 
-	if (sscanf(mvalue2, "%f", &fnum2) != 1) {
+	if (sscanf(mvalue2, "%30f", &fnum2) != 1) {
 		ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue2);
 		LOCAL_USER_REMOVE(u);
 		return -1;

Modified: branches/1.2/apps/app_meetme.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_meetme.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_meetme.c (original)
+++ branches/1.2/apps/app_meetme.c Mon Aug 10 14:12:35 2009
@@ -497,7 +497,7 @@
 				ast_verbose(VERBOSE_PREFIX_3 "Created MeetMe conference %d for conference '%s'\n", cnf->zapconf, cnf->confno);
 			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;
 		} else	
 			ast_log(LOG_WARNING, "Out of memory\n");
@@ -806,7 +806,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;
@@ -862,7 +862,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;
 	}
@@ -1901,7 +1901,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, "");
@@ -2020,7 +2020,7 @@
 		return NULL;
 	}
 
-	sscanf(callerident, "%i", &cid);
+	sscanf(callerident, "%30i", &cid);
 
 	AST_LIST_TRAVERSE(&conf->userlist, user, list) {
 		if (user->user_no == cid)
@@ -2179,7 +2179,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 < ZT_DEFAULT_NUM_BUFS) || (audio_buffers > ZT_MAX_NUM_BUFS)) {

Modified: branches/1.2/apps/app_mixmonitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_mixmonitor.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_mixmonitor.c (original)
+++ branches/1.2/apps/app_mixmonitor.c Mon Aug 10 14:12:35 2009
@@ -336,7 +336,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);
@@ -346,7 +346,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);
@@ -356,7 +356,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: branches/1.2/apps/app_osplookup.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_osplookup.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_osplookup.c (original)
+++ branches/1.2/apps/app_osplookup.c Mon Aug 10 14:12:35 2009
@@ -216,11 +216,11 @@
 	cause = str2cause(args.cause);
 	temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
 	result.handle = -1;
-	if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.handle) != 1)) {
+	if (ast_strlen_zero(temp) || (sscanf(temp, "%30d", &result.handle) != 1)) {
 		result.handle = -1;
 	}
 	temp = pbx_builtin_getvar_helper(chan, "OSPRESULTS");
-	if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.numresults) != 1)) {
+	if (ast_strlen_zero(temp) || (sscanf(temp, "%30d", &result.numresults) != 1)) {
 		result.numresults = 0;
 	}
 	if ((res = ast_osp_next(&result, cause)) > 0) {
@@ -301,7 +301,7 @@
 	cause = str2cause(args.status);
 	temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
 	result.handle = -1;
-	if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
+	if (!ast_strlen_zero(temp) && (sscanf(temp, "%30d", &result.handle) == 1) && (result.handle > -1)) {
 		if (!ast_osp_terminate(result.handle, cause, start, duration)) {
 			pbx_builtin_setvar_helper(chan, "_OSPHANDLE", "");
 			pbx_builtin_setvar_helper(chan, "OSPFINISHSTATUS", "SUCCESS");

Modified: branches/1.2/apps/app_privacy.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_privacy.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_privacy.c (original)
+++ branches/1.2/apps/app_privacy.c Mon Aug 10 14:12:35 2009
@@ -125,13 +125,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");
@@ -148,14 +148,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: branches/1.2/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_queue.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_queue.c (original)
+++ branches/1.2/apps/app_queue.c Mon Aug 10 14:12:35 2009
@@ -2973,7 +2973,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;
 		}
@@ -3062,7 +3062,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);
@@ -3716,7 +3716,7 @@
 
 	if (ast_strlen_zero(penalty_s))
 		penalty = 0;
-	else if (sscanf(penalty_s, "%d", &penalty) != 1) {
+	else if (sscanf(penalty_s, "%30d", &penalty) != 1) {
 		penalty = 0;
 	}
 
@@ -3814,7 +3814,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: branches/1.2/apps/app_random.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_random.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_random.c (original)
+++ branches/1.2/apps/app_random.c Mon Aug 10 14:12:35 2009
@@ -79,7 +79,7 @@
 	}
 
 	prob = strsep(&s,":");
-	if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
+	if ((!prob) || (sscanf(prob, "%3d", &probint) != 1))
 		probint = 0;
 
 	if ((random() % 100) + probint >= 100) {

Modified: branches/1.2/apps/app_readfile.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_readfile.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_readfile.c (original)
+++ branches/1.2/apps/app_readfile.c Mon Aug 10 14:12:35 2009
@@ -89,7 +89,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: branches/1.2/apps/app_record.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_record.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_record.c (original)
+++ branches/1.2/apps/app_record.c Mon Aug 10 14:12:35 2009
@@ -146,7 +146,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);
@@ -154,7 +154,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: branches/1.2/apps/app_sayunixtime.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_sayunixtime.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_sayunixtime.c (original)
+++ branches/1.2/apps/app_sayunixtime.c Mon Aug 10 14:12:35 2009
@@ -96,7 +96,7 @@
 			timec = strsep(&s,"|");
 			if ((timec) && (*timec != '\0')) {
 				long timein;
-				if (sscanf(timec,"%ld",&timein) == 1) {
+				if (sscanf(timec,"%30ld",&timein) == 1) {
 					unixtime = (time_t)timein;
 				}
 			}

Modified: branches/1.2/apps/app_sms.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_sms.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_sms.c (original)
+++ branches/1.2/apps/app_sms.c Mon Aug 10 14:12:35 2009
@@ -748,7 +748,7 @@
 						  H,
 						  M,
 						  S;
-						if (sscanf (p, "%d-%d-%dT%d:%d:%d", &Y, &m, &d, &H, &M, &S) == 6)
+						if (sscanf (p, "%4d-%2d-%2dT%2d:%2d:%2d", &Y, &m, &d, &H, &M, &S) == 6)
 						{
 							struct tm t;
 							t.tm_year = Y - 1900;

Modified: branches/1.2/apps/app_talkdetect.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_talkdetect.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_talkdetect.c (original)
+++ branches/1.2/apps/app_talkdetect.c Mon Aug 10 14:12:35 2009
@@ -97,15 +97,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: branches/1.2/apps/app_verbose.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_verbose.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_verbose.c (original)
+++ branches/1.2/apps/app_verbose.c Mon Aug 10 14:12:35 2009
@@ -65,7 +65,7 @@
 		if (vtext) {
 			char *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: branches/1.2/apps/app_voicemail.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_voicemail.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Mon Aug 10 14:12:35 2009
@@ -463,7 +463,7 @@
 	} else if (!strcasecmp(var, "sayduration")){
 		ast_set2_flag(vmu, ast_true(value), VM_SAYDURATION);	
 	} else if (!strcasecmp(var, "saydurationm")){
-		if (sscanf(value, "%d", &x) == 1) {
+		if (sscanf(value, "%30d", &x) == 1) {
 			vmu->saydurationm = x;
 		} else {
 			ast_log(LOG_WARNING, "Invalid min duration for say duration\n");
@@ -1042,7 +1042,7 @@
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			goto yuck;
 		}
-		if (sscanf(rowdata, "%d", &x) != 1)
+		if (sscanf(rowdata, "%30d", &x) != 1)
 			ast_log(LOG_WARNING, "Failed to read message count!\n");
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 	} else
@@ -1096,7 +1096,7 @@
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			goto yuck;
 		}
-		if (sscanf(rowdata, "%d", &x) != 1)
+		if (sscanf(rowdata, "%30d", &x) != 1)
 			ast_log(LOG_WARNING, "Failed to read message count!\n");
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 	} else
@@ -3695,7 +3695,7 @@
 	time_t t;
 	long tin;
 
-	if (sscanf(origtime,"%ld",&tin) < 1) {
+	if (sscanf(origtime,"%30ld",&tin) < 1) {
 		ast_log(LOG_WARNING, "Couldn't find origtime in %s\n", filename);
 		return 0;
 	}
@@ -5191,7 +5191,7 @@
 					ast_log(LOG_WARNING, "No value provided for record gain option\n");
 					LOCAL_USER_REMOVE(u);
 					return -1;
-				} else if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
+				} else if (sscanf(opts[OPT_ARG_RECORDGAIN], "%30d", &gain) != 1) {
 					ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
 					LOCAL_USER_REMOVE(u);
 					return -1;
@@ -5633,7 +5633,7 @@
 			if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
 				int gain;
 
-				if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
+				if (sscanf(opts[OPT_ARG_RECORDGAIN], "%30d", &gain) != 1) {
 					ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
 					LOCAL_USER_REMOVE(u);
 					return -1;
@@ -6067,7 +6067,7 @@
 		
 		vmmaxmessage = 0;
 		if ((s = ast_variable_retrieve(cfg, "general", "maxmessage"))) {
-			if (sscanf(s, "%d", &x) == 1) {
+			if (sscanf(s, "%30d", &x) == 1) {
 				vmmaxmessage = x;
 			} else {
 				ast_log(LOG_WARNING, "Invalid max message time length\n");
@@ -6076,7 +6076,7 @@
 
 		vmminmessage = 0;
 		if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
-			if (sscanf(s, "%d", &x) == 1) {
+			if (sscanf(s, "%30d", &x) == 1) {
 				vmminmessage = x;
 				if (maxsilence <= vmminmessage)
 					ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
@@ -6091,7 +6091,7 @@
 
 		skipms = 3000;
 		if ((s = ast_variable_retrieve(cfg, "general", "maxgreet"))) {
-			if (sscanf(s, "%d", &x) == 1) {
+			if (sscanf(s, "%30d", &x) == 1) {
 				maxgreet = x;
 			} else {
 				ast_log(LOG_WARNING, "Invalid max message greeting length\n");
@@ -6099,7 +6099,7 @@
 		}
 
 		if ((s = ast_variable_retrieve(cfg, "general", "skipms"))) {
-			if (sscanf(s, "%d", &x) == 1) {
+			if (sscanf(s, "%30d", &x) == 1) {
 				skipms = x;
 			} else {
 				ast_log(LOG_WARNING, "Invalid skipms value\n");
@@ -6108,7 +6108,7 @@
 
 		maxlogins = 3;
 		if ((s = ast_variable_retrieve(cfg, "general", "maxlogins"))) {
-			if (sscanf(s, "%d", &x) == 1) {
+			if (sscanf(s, "%30d", &x) == 1) {
 				maxlogins = x;
 			} else {
 				ast_log(LOG_WARNING, "Invalid max failed login attempts\n");
@@ -6178,7 +6178,7 @@
 
 		saydurationminfo = 2;
 		if ((astsaydurationminfo = ast_variable_retrieve(cfg, "general", "saydurationm"))) {
-			if (sscanf(astsaydurationminfo, "%d", &x) == 1) {
+			if (sscanf(astsaydurationminfo, "%30d", &x) == 1) {
 				saydurationminfo = x;
 			} else {
 				ast_log(LOG_WARNING, "Invalid min duration for say duration\n");

Modified: branches/1.2/apps/app_waitforring.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_waitforring.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_waitforring.c (original)
+++ branches/1.2/apps/app_waitforring.c Mon Aug 10 14:12:35 2009
@@ -63,7 +63,7 @@
 	int res = 0;
 	int ms;
 
-	if (!data || (sscanf(data, "%d", &ms) != 1)) {
+	if (!data || (sscanf(data, "%30d", &ms) != 1)) {
                 ast_log(LOG_WARNING, "WaitForRing requires an argument (minimum seconds)\n");
 		return 0;
 	}

Modified: branches/1.2/apps/app_waitforsilence.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_waitforsilence.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_waitforsilence.c (original)
+++ branches/1.2/apps/app_waitforsilence.c Mon Aug 10 14:12:35 2009
@@ -157,8 +157,8 @@
 	
 	res = ast_answer(chan); /* Answer the channel */
 
-	if (!data || ((sscanf(data, "%d|%d", &maxsilence, &iterations) != 2) &&
-		(sscanf(data, "%d", &maxsilence) != 1))) {
+	if (!data || ((sscanf(data, "%30d|%30d", &maxsilence, &iterations) != 2) &&
+		(sscanf(data, "%30d", &maxsilence) != 1))) {
 		ast_log(LOG_WARNING, "Using default value of 1000ms, 1 iteration\n");
 	}
 

Modified: branches/1.2/apps/app_zapbarge.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/apps/app_zapbarge.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/apps/app_zapbarge.c (original)
+++ branches/1.2/apps/app_zapbarge.c Mon Aug 10 14:12:35 2009
@@ -272,8 +272,8 @@
 	LOCAL_USER_ADD(u);
 	
 	if (!ast_strlen_zero(data)) {
-		if ((sscanf(data, "Zap/%d", &confno) != 1) &&
-		    (sscanf(data, "%d", &confno) != 1)) {
+		if ((sscanf(data, "Zap/%3d", &confno) != 1) &&
+		    (sscanf(data, "%3d", &confno) != 1)) {
 			ast_log(LOG_WARNING, "ZapBarge Argument (if specified) must be a channel number, not '%s'\n", (char *)data);
 			LOCAL_USER_REMOVE(u);
 			return 0;
@@ -288,7 +288,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, "%3d", &confno) != 1)
 			confno = 0;
 	}
 	if (confno) {

Modified: branches/1.2/asterisk.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/asterisk.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/asterisk.c (original)
+++ branches/1.2/asterisk.c Mon Aug 10 14:12:35 2009
@@ -706,7 +706,7 @@
 	if (!ast_strlen_zero(ast_config_AST_CTL_PERMISSIONS)) {
 		int p1;
 		mode_t p;
-		sscanf(ast_config_AST_CTL_PERMISSIONS, "%o", &p1);
+		sscanf(ast_config_AST_CTL_PERMISSIONS, "%30o", &p1);
 		p = p1;
 		if ((chmod(ast_config_AST_SOCKET, p)) < 0)
 			ast_log(LOG_WARNING, "Unable to change file permissions of %s: %s\n", ast_config_AST_SOCKET, strerror(errno));
@@ -1357,10 +1357,10 @@
 				switch (*t) {
 					case 'C': /* color */
 						t++;
-						if (sscanf(t, "%d;%d%n", &fgcolor, &bgcolor, &i) == 2) {
+						if (sscanf(t, "%30d;%30d%n", &fgcolor, &bgcolor, &i) == 2) {
 							strncat(p, term_color_code(term_code, fgcolor, bgcolor, sizeof(term_code)),sizeof(prompt) - strlen(prompt) - 1);
 							t += i - 1;
-						} else if (sscanf(t, "%d%n", &fgcolor, &i) == 1) {
+						} else if (sscanf(t, "%30d%n", &fgcolor, &i) == 1) {
 							strncat(p, term_color_code(term_code, fgcolor, 0, sizeof(term_code)),sizeof(prompt) - strlen(prompt) - 1);
 							t += i - 1;
 						}
@@ -1405,9 +1405,9 @@
 						if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
 							float avg1, avg2, avg3;
 							int actproc, totproc, npid, which;
-							fscanf(LOADAVG, "%f %f %f %d/%d %d",
+							fscanf(LOADAVG, "%30f %30f %30f %30d/%30d %30d",
 								&avg1, &avg2, &avg3, &actproc, &totproc, &npid);
-							if (sscanf(t, "%d", &which) == 1) {
+							if (sscanf(t, "%30d", &which) == 1) {
 								switch (which) {
 									case 1:
 										snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg1);
@@ -1949,7 +1949,7 @@
 		/* debug level (-d at startup) */
 		} else if (!strcasecmp(v->name, "debug")) {
 			option_debug = 0;
-			if (sscanf(v->value, "%d", &option_debug) != 1) {
+			if (sscanf(v->value, "%30d", &option_debug) != 1) {
 				option_debug = ast_true(v->value);
 			}
 		/* Disable forking (-f at startup) */
@@ -1989,7 +1989,7 @@
 		} else if (!strcasecmp(v->name, "transmit_silence_during_record")) {
 			option_transmit_silence_during_record = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "maxcalls")) {
-			if ((sscanf(v->value, "%d", &option_maxcalls) != 1) || (option_maxcalls < 0)) {
+			if ((sscanf(v->value, "%30d", &option_maxcalls) != 1) || (option_maxcalls < 0)) {
 				option_maxcalls = 0;
 			}
 		} else if (!strcasecmp(v->name, "maxload")) {
@@ -1998,7 +1998,7 @@
 			if (getloadavg(test, 1) == -1) {
 				ast_log(LOG_ERROR, "Cannot obtain load average on this system. 'maxload' option disabled.\n");
 				option_maxload = 0.0;
-			} else if ((sscanf(v->value, "%lf", &option_maxload) != 1) || (option_maxload < 0.0)) {
+			} else if ((sscanf(v->value, "%30lf", &option_maxload) != 1) || (option_maxload < 0.0)) {
 				option_maxload = 0.0;
 			}
 		/* What user to run as */
@@ -2118,11 +2118,11 @@
 			option_nofork++;
 			break;
 		case 'M':
-			if ((sscanf(optarg, "%d", &option_maxcalls) != 1) || (option_maxcalls < 0))
+			if ((sscanf(optarg, "%30d", &option_maxcalls) != 1) || (option_maxcalls < 0))
 				option_maxcalls = 0;
 			break;
 		case 'L':
-			if ((sscanf(optarg, "%lf", &option_maxload) != 1) || (option_maxload < 0.0))
+			if ((sscanf(optarg, "%30lf", &option_maxload) != 1) || (option_maxload < 0.0))
 				option_maxload = 0.0;
 			break;
 		case 'q':

Modified: branches/1.2/cdr.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/cdr.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/cdr.c (original)
+++ branches/1.2/cdr.c Mon Aug 10 14:12:35 2009
@@ -1193,7 +1193,7 @@
 			batchsafeshutdown = ast_true(batchsafeshutdown_value);
 		}
 		if ((size_value = ast_variable_retrieve(config, "general", "size"))) {
-			if (sscanf(size_value, "%d", &cfg_size) < 1)
+			if (sscanf(size_value, "%30d", &cfg_size) < 1)
 				ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", size_value);
 			else if (size_value < 0)
 				ast_log(LOG_WARNING, "Invalid maximum batch size '%d' specified, using default\n", cfg_size);
@@ -1201,7 +1201,7 @@
 				batchsize = cfg_size;
 		}
 		if ((time_value = ast_variable_retrieve(config, "general", "time"))) {
-			if (sscanf(time_value, "%d", &cfg_time) < 1)
+			if (sscanf(time_value, "%30d", &cfg_time) < 1)
 				ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", time_value);
 			else if (time_value < 0)
 				ast_log(LOG_WARNING, "Invalid maximum batch time '%d' specified, using default\n", cfg_time);

Modified: branches/1.2/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/channel.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Mon Aug 10 14:12:35 2009
@@ -3875,9 +3875,9 @@
 	c = copy;
 	
 	while((piece = strsep(&c, ","))) {
-		if (sscanf(piece, "%d-%d", &start, &finish) == 2) {
+		if (sscanf(piece, "%30d-%30d", &start, &finish) == 2) {
 			/* Range */
-		} else if (sscanf(piece, "%d", &start)) {
+		} else if (sscanf(piece, "%30d", &start)) {
 			/* Just one */
 			finish = start;
 		} else {

Modified: branches/1.2/channels/chan_agent.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.2/channels/chan_agent.c?view=diff&rev=211526&r1=211525&r2=211526
==============================================================================
--- branches/1.2/channels/chan_agent.c (original)
+++ branches/1.2/channels/chan_agent.c Mon Aug 10 14:12:35 2009
@@ -1296,9 +1296,9 @@
 	struct timeval tv;
 
 	s = data;
-	if ((s[0] == '@') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+	if ((s[0] == '@') && (sscanf(s + 1, "%30d", &groupoff) == 1)) {
 		groupmatch = (1 << groupoff);
-	} else if ((s[0] == ':') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+	} else if ((s[0] == ':') && (sscanf(s + 1, "%30d", &groupoff) == 1)) {
 		groupmatch = (1 << groupoff);
 		waitforagent = 1;
 	} else {
@@ -2405,9 +2405,9 @@
 	int res = AST_DEVICE_INVALID;
 	
 	s = data;
-	if ((s[0] == '@') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+	if ((s[0] == '@') && (sscanf(s + 1, "%30d", &groupoff) == 1)) {
 		groupmatch = (1 << groupoff);
-	} else if ((s[0] == ':') && (sscanf(s + 1, "%d", &groupoff) == 1)) {

[... 1445 lines stripped ...]



More information about the asterisk-commits mailing list