[asterisk-commits] tilghman: trunk r211539 - in /trunk: ./ addons/ agi/ apps/ cdr/ cel/ channels...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 10 14:21:08 CDT 2009
Author: tilghman
Date: Mon Aug 10 14:20:57 2009
New Revision: 211539
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=211539
Log:
AST-2009-005
Modified:
trunk/ (props changed)
trunk/addons/app_mysql.c
trunk/addons/app_saycountpl.c
trunk/addons/cdr_mysql.c
trunk/addons/chan_ooh323.c
trunk/addons/res_config_mysql.c
trunk/agi/eagi-sphinx-test.c
trunk/agi/eagi-test.c
trunk/apps/app_adsiprog.c
trunk/apps/app_alarmreceiver.c
trunk/apps/app_chanspy.c
trunk/apps/app_dahdibarge.c
trunk/apps/app_disa.c
trunk/apps/app_followme.c
trunk/apps/app_macro.c
trunk/apps/app_meetme.c
trunk/apps/app_minivm.c
trunk/apps/app_mixmonitor.c
trunk/apps/app_morsecode.c
trunk/apps/app_originate.c
trunk/apps/app_osplookup.c
trunk/apps/app_privacy.c
trunk/apps/app_queue.c
trunk/apps/app_readfile.c
trunk/apps/app_record.c
trunk/apps/app_rpt.c
trunk/apps/app_setcallerid.c
trunk/apps/app_sms.c
trunk/apps/app_stack.c
trunk/apps/app_talkdetect.c
trunk/apps/app_verbose.c
trunk/apps/app_voicemail.c
trunk/apps/app_waitforring.c
trunk/apps/app_waitforsilence.c
trunk/apps/app_waituntil.c
trunk/cdr/cdr_adaptive_odbc.c
trunk/cdr/cdr_pgsql.c
trunk/cel/cel_adaptive_odbc.c
trunk/cel/cel_pgsql.c
trunk/channels/chan_agent.c
trunk/channels/chan_dahdi.c
trunk/channels/chan_iax2.c
trunk/channels/chan_mgcp.c
trunk/channels/chan_misdn.c
trunk/channels/chan_oss.c
trunk/channels/chan_phone.c
trunk/channels/chan_sip.c
trunk/channels/chan_skinny.c
trunk/channels/chan_usbradio.c
trunk/channels/iax2-provision.c
trunk/channels/misdn_config.c
trunk/channels/sig_pri.c
trunk/channels/xpmr/xpmr.c
trunk/codecs/codec_speex.c
trunk/doc/CODING-GUIDELINES
trunk/funcs/func_channel.c
trunk/funcs/func_cut.c
trunk/funcs/func_dialplan.c
trunk/funcs/func_enum.c
trunk/funcs/func_math.c
trunk/funcs/func_odbc.c
trunk/funcs/func_rand.c
trunk/funcs/func_speex.c
trunk/funcs/func_sprintf.c
trunk/funcs/func_timeout.c
trunk/main/acl.c
trunk/main/asterisk.c
trunk/main/cdr.c
trunk/main/channel.c
trunk/main/cli.c
trunk/main/config.c
trunk/main/dnsmgr.c
trunk/main/dsp.c
trunk/main/enum.c
trunk/main/features.c
trunk/main/frame.c
trunk/main/http.c
trunk/main/indications.c
trunk/main/manager.c
trunk/main/netsock.c
trunk/main/pbx.c
trunk/main/timing.c
trunk/main/utils.c
trunk/pbx/pbx_config.c
trunk/pbx/pbx_dundi.c
trunk/pbx/pbx_loopback.c
trunk/pbx/pbx_spool.c
trunk/res/ael/pval.c
trunk/res/res_agi.c
trunk/res/res_config_curl.c
trunk/res/res_config_ldap.c
trunk/res/res_config_pgsql.c
trunk/res/res_config_sqlite.c
trunk/res/res_http_post.c
trunk/res/res_limit.c
trunk/res/res_musiconhold.c
trunk/res/res_odbc.c
trunk/res/res_smdi.c
trunk/res/snmp/agent.c
trunk/utils/extconf.c
trunk/utils/frame.c
trunk/utils/muted.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/addons/app_mysql.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/app_mysql.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/addons/app_mysql.c (original)
+++ trunk/addons/app_mysql.c Mon Aug 10 14:20:57 2009
@@ -333,7 +333,7 @@
}
ctimeout = pbx_builtin_getvar_helper(chan, "MYSQL_TIMEOUT");
- if (ctimeout && sscanf(ctimeout, "%d", &timeout) == 1) {
+ if (ctimeout && sscanf(ctimeout, "%30d", &timeout) == 1) {
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (void *)&timeout);
}
@@ -408,7 +408,7 @@
int connid = -1;
AST_NONSTANDARD_APP_ARGS(args, data, ' ');
- sscanf(args.connid, "%d", &connid);
+ sscanf(args.connid, "%30d", &connid);
if (args.argc != 3 || connid <= 0) {
ast_log(LOG_WARNING, "missing some arguments\n");
@@ -451,7 +451,7 @@
parse = ast_strdupa(data);
AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
- sscanf(args.fetchid, "%d", &resultid);
+ sscanf(args.fetchid, "%30d", &resultid);
if (args.resultvar && (resultid >= 0) ) {
if ((mysqlres = find_identifier(resultid, AST_MYSQL_ID_RESID)) != NULL) {
Modified: trunk/addons/app_saycountpl.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/app_saycountpl.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/addons/app_saycountpl.c (original)
+++ trunk/addons/app_saycountpl.c Mon Aug 10 14:20:57 2009
@@ -107,7 +107,7 @@
return -1;
}
- if (sscanf(args.num, "%d", &inum) != 1) {
+ if (sscanf(args.num, "%30d", &inum) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", args.num);
return -1;
}
Modified: trunk/addons/cdr_mysql.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/cdr_mysql.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/addons/cdr_mysql.c (original)
+++ trunk/addons/cdr_mysql.c Mon Aug 10 14:20:57 2009
@@ -383,7 +383,7 @@
tmp = ast_variable_retrieve(cfg, category, variable);
- if (!tmp || sscanf(tmp, "%d", field) < 1)
+ if (!tmp || sscanf(tmp, "%30d", field) < 1)
*field = def;
return 0;
Modified: trunk/addons/chan_ooh323.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Mon Aug 10 14:20:57 2009
@@ -424,7 +424,7 @@
/*
Possible data values - peername, exten/peername, exten at ip
*/
-static struct ast_channel *ooh323_request(const char *type, int format,
+static struct ast_channel *ooh323_request(const char *type, int format, const struct ast_channel *requestor,
void *data, int *cause)
{
struct ast_channel *chan = NULL;
@@ -1886,7 +1886,7 @@
if (gRTPTimeout <= 0)
gRTPTimeout = 60;
} else if (!strcasecmp(v->name, "tos")) {
- if (sscanf(v->value, "%i", &format) == 1)
+ if (sscanf(v->value, "%30i", &format) == 1)
gTOS = format & 0xff;
else if (!strcasecmp(v->value, "lowdelay"))
gTOS = IPTOS_LOWDELAY;
Modified: trunk/addons/res_config_mysql.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/addons/res_config_mysql.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/addons/res_config_mysql.c (original)
+++ trunk/addons/res_config_mysql.c Mon Aug 10 14:20:57 2009
@@ -245,7 +245,7 @@
}
if ((flen = strchr(ftype, '('))) {
- sscanf(flen, "(%d)", &column->len);
+ sscanf(flen, "(%30d)", &column->len);
} else {
/* Columns like dates, times, and timestamps don't have a length */
column->len = -1;
Modified: trunk/agi/eagi-sphinx-test.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/agi/eagi-sphinx-test.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/agi/eagi-sphinx-test.c (original)
+++ trunk/agi/eagi-sphinx-test.c Mon Aug 10 14:20:57 2009
@@ -223,7 +223,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: trunk/agi/eagi-test.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/agi/eagi-test.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/agi/eagi-test.c (original)
+++ trunk/agi/eagi-test.c Mon Aug 10 14:20:57 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: trunk/apps/app_adsiprog.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_adsiprog.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_adsiprog.c (original)
+++ trunk/apps/app_adsiprog.c Mon Aug 10 14:20:57 2009
@@ -201,7 +201,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 */
@@ -211,7 +211,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 */
@@ -221,7 +221,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: trunk/apps/app_alarmreceiver.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_alarmreceiver.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_alarmreceiver.c (original)
+++ trunk/apps/app_alarmreceiver.c Mon Aug 10 14:20:57 2009
@@ -124,7 +124,7 @@
return;
}
- sscanf(value, "%u", &v);
+ sscanf(value, "%30u", &v);
v++;
ast_verb(4, "AlarmReceiver: New value for %s: %u\n", key, v);
Modified: trunk/apps/app_chanspy.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Mon Aug 10 14:20:57 2009
@@ -1037,7 +1037,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;
@@ -1158,7 +1158,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: trunk/apps/app_dahdibarge.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_dahdibarge.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_dahdibarge.c (original)
+++ trunk/apps/app_dahdibarge.c Mon Aug 10 14:20:57 2009
@@ -267,8 +267,8 @@
char confnostr[80] = "";
if (!ast_strlen_zero(data)) {
- 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, "DAHDIBarge Argument (if specified) must be a channel number, not '%s'\n", (char *)data);
return 0;
}
@@ -282,7 +282,7 @@
confnostr[0] = '\0';
res = ast_app_getdata(chan, "conf-getchannel",confnostr, sizeof(confnostr) - 1, 0);
if (res <0) goto out;
- if (sscanf(confnostr, "%d", &confno) != 1)
+ if (sscanf(confnostr, "%30d", &confno) != 1)
confno = 0;
}
if (confno) {
Modified: trunk/apps/app_disa.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_disa.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_disa.c (original)
+++ trunk/apps/app_disa.c Mon Aug 10 14:20:57 2009
@@ -250,7 +250,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);
@@ -276,7 +276,7 @@
ast_debug(1, "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: trunk/apps/app_followme.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_followme.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Mon Aug 10 14:20:57 2009
@@ -334,7 +334,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;
}
@@ -956,7 +956,7 @@
if (!(numstr = ast_variable_retrieve(cfg, catg, "phonenumber"))) {
continue;
}
- if (!(timeoutstr = ast_variable_retrieve(cfg, catg, "timeout")) || sscanf(timeoutstr, "%d", &timeout) != 1 || timeout < 1) {
+ if (!(timeoutstr = ast_variable_retrieve(cfg, catg, "timeout")) || sscanf(timeoutstr, "%30d", &timeout) != 1 || timeout < 1) {
timeout = 25;
}
/* This one has to exist; it was part of the query */
Modified: trunk/apps/app_macro.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_macro.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Mon Aug 10 14:20:57 2009
@@ -266,12 +266,12 @@
/* does the user want a deeper rabbit hole? */
ast_channel_lock(chan);
if ((s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION"))) {
- sscanf(s, "%d", &maxdepth);
+ sscanf(s, "%30d", &maxdepth);
}
/* Count how many levels deep the rabbit hole goes */
if ((s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH"))) {
- sscanf(s, "%d", &depth);
+ sscanf(s, "%30d", &depth);
}
/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
@@ -279,7 +279,7 @@
pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
if ((inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP"))) {
- sscanf(inhangupc, "%d", &inhangup);
+ sscanf(inhangupc, "%30d", &inhangup);
}
ast_channel_unlock(chan);
@@ -543,7 +543,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: trunk/apps/app_meetme.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Mon Aug 10 14:20:57 2009
@@ -1206,7 +1206,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:
@@ -1874,7 +1874,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, "%4d", &confno_int) == 1) && (confno_int >= 0 && confno_int < 1024)) {
conf_map[confno_int] = 0;
}
conf_free(conf);
@@ -2101,7 +2101,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;
}
@@ -3857,7 +3857,7 @@
if (!res)
ast_waitstream(chan, "");
} else {
- if (sscanf(confno, "%d", &confno_int) == 1) {
+ if (sscanf(confno, "%30d", &confno_int) == 1) {
if (!ast_test_flag(&confflags, CONFFLAG_QUIET)) {
res = ast_streamfile(chan, "conf-enteringno", chan->language);
if (!res) {
@@ -3994,7 +3994,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)
@@ -4501,7 +4501,7 @@
rt_log_members = 1;
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)) {
@@ -4518,25 +4518,25 @@
if ((val = ast_variable_retrieve(cfg, "general", "logmembercount")))
rt_log_members = ast_true(val);
if ((val = ast_variable_retrieve(cfg, "general", "fuzzystart"))) {
- if ((sscanf(val, "%d", &fuzzystart) != 1)) {
+ if ((sscanf(val, "%30d", &fuzzystart) != 1)) {
ast_log(LOG_WARNING, "fuzzystart must be a number, not '%s'\n", val);
fuzzystart = 0;
}
}
if ((val = ast_variable_retrieve(cfg, "general", "earlyalert"))) {
- if ((sscanf(val, "%d", &earlyalert) != 1)) {
+ if ((sscanf(val, "%30d", &earlyalert) != 1)) {
ast_log(LOG_WARNING, "earlyalert must be a number, not '%s'\n", val);
earlyalert = 0;
}
}
if ((val = ast_variable_retrieve(cfg, "general", "endalert"))) {
- if ((sscanf(val, "%d", &endalert) != 1)) {
+ if ((sscanf(val, "%30d", &endalert) != 1)) {
ast_log(LOG_WARNING, "endalert must be a number, not '%s'\n", val);
endalert = 0;
}
}
if ((val = ast_variable_retrieve(cfg, "general", "extendby"))) {
- if ((sscanf(val, "%d", &extendby) != 1)) {
+ if ((sscanf(val, "%30d", &extendby) != 1)) {
ast_log(LOG_WARNING, "extendby must be a number, not '%s'\n", val);
extendby = 0;
}
@@ -6102,7 +6102,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;
@@ -6178,13 +6178,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;
@@ -6233,13 +6233,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: trunk/apps/app_minivm.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_minivm.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Mon Aug 10 14:20:57 2009
@@ -2169,7 +2169,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]);
return -1;
} else
@@ -2596,7 +2596,7 @@
} else if (!strcasecmp(var->name, "pager")) {
ast_copy_string(vmu->pager, var->value, sizeof(vmu->pager));
} else if (!strcasecmp(var->name, "volgain")) {
- sscanf(var->value, "%lf", &vmu->volgain);
+ sscanf(var->value, "%30lf", &vmu->volgain);
} else {
ast_log(LOG_ERROR, "Unknown configuration option for minivm account %s : %s\n", name, var->name);
}
@@ -2766,7 +2766,7 @@
global_silencethreshold = atoi(var->value);
} else if (!strcmp(var->name, "maxmessage")) {
int x;
- if (sscanf(var->value, "%d", &x) == 1) {
+ if (sscanf(var->value, "%30d", &x) == 1) {
global_vmmaxmessage = x;
} else {
error ++;
@@ -2774,7 +2774,7 @@
}
} else if (!strcmp(var->name, "minmessage")) {
int x;
- if (sscanf(var->value, "%d", &x) == 1) {
+ if (sscanf(var->value, "%30d", &x) == 1) {
global_vmminmessage = x;
if (global_maxsilence <= global_vmminmessage)
ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
Modified: trunk/apps/app_mixmonitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_mixmonitor.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Mon Aug 10 14:20:57 2009
@@ -459,7 +459,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);
@@ -469,7 +469,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);
@@ -479,7 +479,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: trunk/apps/app_morsecode.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_morsecode.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_morsecode.c (original)
+++ trunk/apps/app_morsecode.c Mon Aug 10 14:20:57 2009
@@ -132,7 +132,7 @@
/* Use variable MORESEDITLEN, if set (else 80) */
ast_channel_lock(chan);
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;
}
ast_channel_unlock(chan);
@@ -140,7 +140,7 @@
/* Use variable MORSETONE, if set (else 800) */
ast_channel_lock(chan);
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;
}
ast_channel_unlock(chan);
Modified: trunk/apps/app_originate.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_originate.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_originate.c (original)
+++ trunk/apps/app_originate.c Mon Aug 10 14:20:57 2009
@@ -136,7 +136,7 @@
if (args.argc == 5) {
/* Context/Exten/Priority all specified */
- if (sscanf(args.arg3, "%d", &priority) != 1) {
+ if (sscanf(args.arg3, "%30d", &priority) != 1) {
ast_log(LOG_ERROR, "Invalid priority: '%s'\n", args.arg3);
goto return_cleanup;
}
Modified: trunk/apps/app_osplookup.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_osplookup.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_osplookup.c (original)
+++ trunk/apps/app_osplookup.c Mon Aug 10 14:20:57 2009
@@ -416,7 +416,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_debug(1, "OSP: maxconnections '%d'\n", t);
} else {
@@ -424,7 +424,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_debug(1, "OSP: retrydelay '%d'\n", t);
} else {
@@ -432,7 +432,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_debug(1, "OSP: retrylimit '%d'\n", t);
} else {
@@ -440,7 +440,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_debug(1, "OSP: timeout '%d'\n", t);
} else {
@@ -451,7 +451,7 @@
ast_copy_string(p->source, v->value, sizeof(p->source));
ast_debug(1, "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_debug(1, "OSP: authpolicy '%d'\n", t);
} else {
@@ -1588,11 +1588,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), "OSPINNETWORKID")) {
@@ -1734,7 +1734,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_debug(1, "OSPNext: cause '%d'\n", cause);
@@ -1752,23 +1752,23 @@
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), "OSPOUTCALLIDTYPES")) {
- if (sscanf(ast_var_value(current), "%d", &callidtypes) != 1) {
+ if (sscanf(ast_var_value(current), "%30d", &callidtypes) != 1) {
callidtypes = OSP_CALLID_UNDEFINED;
}
} 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;
}
}
@@ -1889,11 +1889,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 &&
@@ -1910,7 +1910,7 @@
ast_debug(1, "OSPFinish: OSPOUTHANDLE '%d'\n", outhandle);
ast_debug(1, "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_debug(1, "OSPFinish: cause '%d'\n", cause);
@@ -2012,7 +2012,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: trunk/apps/app_privacy.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_privacy.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_privacy.c (original)
+++ trunk/apps/app_privacy.c Mon Aug 10 14:20:57 2009
@@ -111,13 +111,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");
Modified: trunk/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_queue.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Aug 10 14:20:57 2009
@@ -5155,7 +5155,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;
}
@@ -5316,7 +5316,7 @@
ast_channel_lock(chan);
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) {
ast_debug(1, "%s: Got priority %d from ${QUEUE_PRIO}.\n", chan->name, prio);
} else {
ast_log(LOG_WARNING, "${QUEUE_PRIO}: Invalid value (%s), channel %s.\n",
@@ -5331,7 +5331,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) {
ast_debug(1, "%s: Got max penalty %d from ${QUEUE_MAX_PENALTY}.\n", chan->name, max_penalty);
} else {
ast_log(LOG_WARNING, "${QUEUE_MAX_PENALTY}: Invalid value (%s), channel %s.\n",
@@ -5343,7 +5343,7 @@
}
if ((min_penalty_str = pbx_builtin_getvar_helper(chan, "QUEUE_MIN_PENALTY"))) {
- if (sscanf(min_penalty_str, "%d", &min_penalty) == 1) {
+ if (sscanf(min_penalty_str, "%30d", &min_penalty) == 1) {
ast_debug(1, "%s: Got min penalty %d from ${QUEUE_MIN_PENALTY}.\n", chan->name, min_penalty);
} else {
ast_log(LOG_WARNING, "${QUEUE_MIN_PENALTY}: Invalid value (%s), channel %s.\n",
@@ -6712,7 +6712,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))
@@ -6952,7 +6952,7 @@
queuename = a->argv[5];
interface = a->argv[3];
if (a->argc >= 8) {
- if (sscanf(a->argv[7], "%d", &penalty) == 1) {
+ if (sscanf(a->argv[7], "%30d", &penalty) == 1) {
if (penalty < 0) {
ast_cli(a->fd, "Penalty must be >= 0\n");
penalty = 0;
Modified: trunk/apps/app_readfile.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_readfile.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_readfile.c (original)
+++ trunk/apps/app_readfile.c Mon Aug 10 14:20:57 2009
@@ -94,7 +94,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: trunk/apps/app_record.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_record.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_record.c (original)
+++ trunk/apps/app_record.c Mon Aug 10 14:20:57 2009
@@ -190,7 +190,7 @@
return -1;
}
if (args.silence) {
- if ((sscanf(args.silence, "%d", &i) == 1) && (i > -1)) {
+ if ((sscanf(args.silence, "%30d", &i) == 1) && (i > -1)) {
silence = i * 1000;
} else if (!ast_strlen_zero(args.silence)) {
ast_log(LOG_WARNING, "'%s' is not a valid silence duration\n", args.silence);
@@ -198,7 +198,7 @@
}
if (args.maxduration) {
- if ((sscanf(args.maxduration, "%d", &i) == 1) && (i > -1))
+ if ((sscanf(args.maxduration, "%30d", &i) == 1) && (i > -1))
/* Convert duration to milliseconds */
maxduration = i * 1000;
else if (!ast_strlen_zero(args.maxduration))
Modified: trunk/apps/app_rpt.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_rpt.c?view=diff&rev=211539&r1=211538&r2=211539
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Mon Aug 10 14:20:57 2009
@@ -2106,7 +2106,7 @@
}
/* leave this %i alone, non-base-10 input is useful here */
- if (sscanf(str, "%i", &ret) != 1) {
+ if (sscanf(str, "%30i", &ret) != 1) {
return -1;
}
@@ -2333,7 +2333,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;
@@ -3650,7 +3650,7 @@
tonesubset = strsep(&stringp,")");
if(!tonesubset)
break;
- if(sscanf(tonesubset,"(%d,%d,%d,%d", &f1, &f2, &duration, &litude) != 4)
+ if(sscanf(tonesubset,"(%30d,%30d,%30d,%30d", &f1, &f2, &duration, &litude) != 4)
break;
res = play_tone_pair(chan, f1, f2, duration, amplitude);
if(res)
@@ -5072,7 +5072,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" */
@@ -6680,6 +6680,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],tmp1[512],cmd[300] = "",dest[300],src[300],c;
int i,seq, res, ts;
struct rpt_link *l;
@@ -6718,7 +6720,7 @@
}
if (tmp[0] == 'K')
{
- if (sscanf(tmp,"%s %s %s %d %d",cmd,dest,src,&seq,&ts) != 5)
[... 3532 lines stripped ...]
More information about the asterisk-commits
mailing list