aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 20:14:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 20:14:34 +0000
commitfea057f6474ed94062cf3cbf4ad096bba62d6832 (patch)
treee189c9a20520ae30231ac1c6573db5f3a289b84c
parent247584d4d4239bc8da24b94e97211296de846046 (diff)
Changes to make 1.4.26 into 1.4.26.1v1.4.26.1
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26.1@211596 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--.version2
-rw-r--r--ChangeLog6
-rw-r--r--agi/eagi-sphinx-test.c2
-rw-r--r--agi/eagi-test.c2
-rw-r--r--apps/app_adsiprog.c6
-rw-r--r--apps/app_alarmreceiver.c2
-rw-r--r--apps/app_chanspy.c4
-rw-r--r--apps/app_dahdibarge.c10
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_disa.c4
-rw-r--r--apps/app_followme.c2
-rw-r--r--apps/app_macro.c8
-rw-r--r--apps/app_meetme.c22
-rw-r--r--apps/app_mixmonitor.c6
-rw-r--r--apps/app_morsecode.c4
-rw-r--r--apps/app_osplookup.c32
-rw-r--r--apps/app_privacy.c8
-rw-r--r--apps/app_queue.c10
-rw-r--r--apps/app_random.c2
-rw-r--r--apps/app_readfile.c2
-rw-r--r--apps/app_record.c4
-rw-r--r--apps/app_rpt.c28
-rw-r--r--apps/app_setcallerid.c2
-rw-r--r--apps/app_sms.c2
-rw-r--r--apps/app_talkdetect.c6
-rw-r--r--apps/app_verbose.c2
-rw-r--r--apps/app_voicemail.c32
-rw-r--r--apps/app_waitforring.c2
-rw-r--r--apps/app_waitforsilence.c6
-rw-r--r--asterisk-1.4.26-summary.html674
-rw-r--r--asterisk-1.4.26-summary.txt808
-rw-r--r--channels/chan_agent.c8
-rw-r--r--channels/chan_dahdi.c34
-rw-r--r--channels/chan_h323.c2
-rw-r--r--channels/chan_iax2.c8
-rw-r--r--channels/chan_mgcp.c16
-rw-r--r--channels/chan_misdn.c2
-rw-r--r--channels/chan_oss.c2
-rw-r--r--channels/chan_phone.c2
-rw-r--r--channels/chan_sip.c94
-rw-r--r--channels/chan_skinny.c2
-rw-r--r--channels/iax2-provision.c4
-rw-r--r--channels/misdn_config.c10
-rw-r--r--codecs/codec_speex.c8
-rw-r--r--doc/CODING-GUIDELINES12
-rw-r--r--funcs/func_channel.c4
-rw-r--r--funcs/func_cut.c10
-rw-r--r--funcs/func_math.c4
-rw-r--r--funcs/func_rand.c4
-rw-r--r--funcs/func_strings.c4
-rw-r--r--main/acl.c4
-rw-r--r--main/asterisk.c20
-rw-r--r--main/cdr.c4
-rw-r--r--main/channel.c4
-rw-r--r--main/cli.c6
-rw-r--r--main/dnsmgr.c2
-rw-r--r--main/frame.c4
-rw-r--r--main/indications.c24
-rw-r--r--main/manager.c12
-rw-r--r--main/pbx.c12
-rw-r--r--main/utils.c2
-rw-r--r--pbx/dundi-parser.c2
-rw-r--r--pbx/pbx_ael.c8
-rw-r--r--pbx/pbx_config.c10
-rw-r--r--pbx/pbx_dundi.c16
-rw-r--r--pbx/pbx_loopback.c2
-rw-r--r--pbx/pbx_spool.c10
-rw-r--r--res/res_agi.c24
-rw-r--r--res/res_features.c14
-rw-r--r--res/res_odbc.c8
-rw-r--r--res/res_smdi.c8
-rw-r--r--utils/frame.c12
-rw-r--r--utils/muted.c4
73 files changed, 347 insertions, 1799 deletions
diff --git a/.version b/.version
index 24d07aa70..ed20f398d 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-1.4.26
+1.4.26.1
diff --git a/ChangeLog b/ChangeLog
index 0e0f7ee83..290733ad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-09 Tilghman Lesher <tlesher@digium.com>
+
+ * Release Asterisk 1.4.26.1
+
+ * AST-2009-005
+
2009-07-20 Leif Madsen <lmadsen@digium.com>
* Release Asterisk 1.4.26
diff --git a/agi/eagi-sphinx-test.c b/agi/eagi-sphinx-test.c
index 968e3cfc3..f3f3abfe9 100644
--- a/agi/eagi-sphinx-test.c
+++ b/agi/eagi-sphinx-test.c
@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
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) {
diff --git a/agi/eagi-test.c b/agi/eagi-test.c
index 9bfbee79e..a768d7fb8 100644
--- a/agi/eagi-test.c
+++ b/agi/eagi-test.c
@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
}
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) {
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index 750cc6fc7..14de26ce8 100644
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -195,7 +195,7 @@ static int process_token(void *out, char *src, int maxlen, int argtype)
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 @@ static int process_token(void *out, char *src, int maxlen, int argtype)
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 @@ static int process_token(void *out, char *src, int maxlen, int argtype)
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 */
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c
index 8afce25d5..7bf98e875 100644
--- a/apps/app_alarmreceiver.c
+++ b/apps/app_alarmreceiver.c
@@ -125,7 +125,7 @@ static void database_increment( char *key )
return;
}
- sscanf(value, "%u", &v);
+ sscanf(value, "%30u", &v);
v++;
if(option_verbose >= 4)
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 8ccfd1a0e..89bce3c57 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -731,7 +731,7 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
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 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
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;
diff --git a/apps/app_dahdibarge.c b/apps/app_dahdibarge.c
index cba85a9b6..e2255185c 100644
--- a/apps/app_dahdibarge.c
+++ b/apps/app_dahdibarge.c
@@ -277,15 +277,15 @@ static int exec(struct ast_channel *chan, void *data, int dahdimode)
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 @@ static int exec(struct ast_channel *chan, void *data, int dahdimode)
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) {
diff --git a/apps/app_dial.c b/apps/app_dial.c
index c8cb3a37d..398dbcb05 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1864,7 +1864,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
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 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
}
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;
}
diff --git a/apps/app_disa.c b/apps/app_disa.c
index f49d19704..3c8bad9d4 100644
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -240,7 +240,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
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 @@ static int disa_exec(struct ast_channel *chan, void *data)
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)) {
diff --git a/apps/app_followme.c b/apps/app_followme.c
index ecf178fdd..73e991135 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -315,7 +315,7 @@ static int reload_followme(void)
featuredigittostr = ast_variable_retrieve(cfg, "general", "featuredigittimeout");
if (!ast_strlen_zero(featuredigittostr)) {
- if (!sscanf(featuredigittostr, "%d", &featuredigittimeout))
+ if (!sscanf(featuredigittostr, "%30d", &featuredigittimeout))
featuredigittimeout = 5000;
}
diff --git a/apps/app_macro.c b/apps/app_macro.c
index af042913a..5586f24e5 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -220,18 +220,18 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
/* 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 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
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;
}
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 9e6af1865..0e82f33f2 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -835,7 +835,7 @@ static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin
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 @@ static int dispose_conf(struct ast_conference *conf)
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 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
/* 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 @@ static int conf_exec(struct ast_channel *chan, void *data)
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 @@ static struct ast_conf_user *find_user(struct ast_conference *conf, char *caller
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 @@ static void load_config_meetme(void)
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 @@ static int sla_build_trunk(struct ast_config *cfg, const char *cat)
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 @@ static void sla_add_trunk_to_station(struct sla_station *station, struct ast_var
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 @@ static int sla_build_station(struct ast_config *cfg, const char *cat)
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;
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 8d86db740..3f784f730 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -451,7 +451,7 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
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 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
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 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
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);
diff --git a/apps/app_morsecode.c b/apps/app_morsecode.c
index aec946a09..8be4861b0 100644
--- a/apps/app_morsecode.c
+++ b/apps/app_morsecode.c
@@ -123,13 +123,13 @@ static int morsecode_exec(struct ast_channel *chan, void *data)
/* 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;
}
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index ad2ce5065..6cd035299 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -208,7 +208,7 @@ static int osp_create_provider(struct ast_config* cfg, const char* provider)
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 @@ static int osp_create_provider(struct ast_config* cfg, const char* provider)
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 @@ static int osp_create_provider(struct ast_config* cfg, const char* provider)
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 @@ static int osp_create_provider(struct ast_config* cfg, const char* provider)
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 @@ static int osp_create_provider(struct ast_config* cfg, const char* provider)
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 @@ static int osplookup_exec(struct ast_channel* chan, void* data)
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 @@ static int ospnext_exec(struct ast_channel* chan, void* data)
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 @@ static int ospnext_exec(struct ast_channel* chan, void* data)
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 @@ static int ospfinished_exec(struct ast_channel* chan, void* data)
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 @@ static int ospfinished_exec(struct ast_channel* chan, void* data)
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 @@ static int osp_load(void)
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;
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 5da93eb40..65bd625d7 100644
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -115,13 +115,13 @@ static int privacy_exec (struct ast_channel *chan, void *data)
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 @@ static int privacy_exec (struct ast_channel *chan, void *data)
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");
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 28958969c..fdf526bce 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3822,7 +3822,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
}
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 @@ static int queue_exec(struct ast_channel *chan, void *data)
/* 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 @@ static int queue_exec(struct ast_channel *chan, void *data)
/* 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 @@ static int manager_add_queue_member(struct mansession *s, const struct message *
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 @@ static int handle_queue_add_member(int fd, int argc, char *argv[])
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;
diff --git a/apps/app_random.c b/apps/app_random.c
index 8484f656d..0d036413d 100644
--- a/apps/app_random.c
+++ b/apps/app_random.c
@@ -71,7 +71,7 @@ static int random_exec(struct ast_channel *chan, void *data)
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) {
diff --git a/apps/app_readfile.c b/apps/app_readfile.c
index 7e43a3806..113a639cf 100644
--- a/apps/app_readfile.c
+++ b/apps/app_readfile.c
@@ -80,7 +80,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
}
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;
}
diff --git a/apps/app_record.c b/apps/app_record.c
index 23e1a9a85..075fd7c28 100644
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -140,7 +140,7 @@ static int record_exec(struct ast_channel *chan, void *data)
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 @@ static int record_exec(struct ast_channel *chan, void *data)
}
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))
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index dd4cd3a7d..2f4af8ca9 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -1522,7 +1522,7 @@ int ret;
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 @@ static char *cs_keywords[] = {"rptena","rptdis","apena","apdis","lnkena","lnkdis
/* 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 @@ static int send_tone_telemetry(struct ast_channel *chan, char *tonestring)
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 @@ struct dahdi_params par;
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 int collect_function_digits(struct rpt *myrpt, char *digits,
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 @@ struct ast_frame wf;
}
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 @@ struct ast_frame wf;
}
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 @@ int ret,res = 0,src;
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 @@ int seq,res;
#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 @@ int seq,res;
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;
diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c
index fb060f11b..2877d00e1 100644
--- a/apps/app_setcallerid.c
+++ b/apps/app_setcallerid.c
@@ -72,7 +72,7 @@ static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
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);
}
diff --git a/apps/app_sms.c b/apps/app_sms.c
index cd445456e..b1bc84988 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -747,7 +747,7 @@ static void sms_readfile (sms_t * h, char *fn)
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;
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c
index 79cbbd5d0..bf35787bb 100644
--- a/apps/app_talkdetect.c
+++ b/apps/app_talkdetect.c
@@ -89,15 +89,15 @@ static int background_detect_exec(struct ast_channel *chan, void *data)
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;
}
}
diff --git a/apps/app_verbose.c b/apps/app_verbose.c
index f9bcfd116..3bd841ad8 100644
--- a/apps/app_verbose.c
+++ b/apps/app_verbose.c
@@ -65,7 +65,7 @@ static int verbose_exec(struct ast_channel *chan, void *data)
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);
}
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5625b01c8..2213f8855 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -647,7 +647,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
} 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");
@@ -672,7 +672,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
vmu->maxmsg = MAXMSGLIMIT;
}
} else if (!strcasecmp(var, "volgain")) {
- sscanf(value, "%lf", &vmu->volgain);
+ sscanf(value, "%30lf", &vmu->volgain);
} else if (!strcasecmp(var, "options")) {
apply_options(vmu, value);
}
@@ -2421,7 +2421,7 @@ static int last_message_index(struct ast_vm_user *vmu, char *dir)
ast_odbc_release_obj(obj);
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);
ast_odbc_release_obj(obj);
@@ -2467,7 +2467,7 @@ static int message_exists(char *dir, int msgnum)
ast_odbc_release_obj(obj);
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);
ast_odbc_release_obj(obj);
@@ -3034,7 +3034,7 @@ static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu
pbx_builtin_setvar_helper(ast, "ORIG_VM_CIDNUM", origcidnum);
}
- if ((origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(origtime, "%d", &inttime) == 1) {
+ if ((origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(origtime, "%30d", &inttime) == 1) {
time_t ttime = inttime;
struct tm tm;
ast_localtime(&ttime, &tm, NULL);
@@ -3354,7 +3354,7 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
/* You might be tempted to do origdate, except that a) it's in the wrong
* format, and b) it's missing for IMAP recordings. */
- if ((v = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(v, "%d", &inttime) == 1) {
+ if ((v = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(v, "%30d", &inttime) == 1) {
time_t ttime = inttime;
struct tm tm;
ast_localtime(&ttime, &tm, NULL);
@@ -7373,7 +7373,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
int gain;
if (!ast_strlen_zero(opts[OPT_ARG_RECORDGAIN])) {
- 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]);
ast_module_user_remove(u);
return -1;
@@ -7387,7 +7387,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPT_AUTOPLAY) ) {
play_auto = 1;
if (opts[OPT_ARG_PLAYFOLDER]) {
- if (sscanf(opts[OPT_ARG_PLAYFOLDER], "%d", &play_folder) != 1) {
+ if (sscanf(opts[OPT_ARG_PLAYFOLDER], "%30d", &play_folder) != 1) {
ast_log(LOG_WARNING, "Invalid value '%s' provided for folder autoplay option\n", opts[OPT_ARG_PLAYFOLDER]);
}
} else {
@@ -7924,7 +7924,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
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]);
ast_module_user_remove(u);
return -1;
@@ -8345,7 +8345,7 @@ static int load_config(void)
volgain = 0.0;
if ((volgainstr = ast_variable_retrieve(cfg, "general", "volgain")))
- sscanf(volgainstr, "%lf", &volgain);
+ sscanf(volgainstr, "%30lf", &volgain);
#ifdef ODBC_STORAGE
strcpy(odbc_database, "asterisk");
@@ -8499,7 +8499,7 @@ static int load_config(void)
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");
@@ -8508,7 +8508,7 @@ static int load_config(void)
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 / 1000 >= vmminmessage)
ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
@@ -8523,7 +8523,7 @@ static int load_config(void)
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");
@@ -8531,7 +8531,7 @@ static int load_config(void)
}
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");
@@ -8540,7 +8540,7 @@ static int load_config(void)
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");
@@ -8629,7 +8629,7 @@ static int load_config(void)
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");
diff --git a/apps/app_waitforring.c b/apps/app_waitforring.c
index a4f69ae77..c4cea20e8 100644
--- a/apps/app_waitforring.c
+++ b/apps/app_waitforring.c
@@ -60,7 +60,7 @@ static int waitforring_exec(struct ast_channel *chan, void *data)
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;
}
diff --git a/apps/app_waitforsilence.c b/apps/app_waitforsilence.c
index 40435fb5c..d0e02e062 100644
--- a/apps/app_waitforsilence.c
+++ b/apps/app_waitforsilence.c
@@ -167,9 +167,9 @@ static int waitforsilence_exec(struct ast_channel *chan, void *data)
res = ast_answer(chan); /* Answer the channel */
- if (!data || ( (sscanf(data, "%d|%d|%d", &silencereqd, &iterations, &timeout) != 3) &&
- (sscanf(data, "%d|%d", &silencereqd, &iterations) != 2) &&
- (sscanf(data, "%d", &silencereqd) != 1) ) ) {
+ if (!data || ( (sscanf(data, "%30d|%30d|%30d", &silencereqd, &iterations, &timeout) != 3) &&
+ (sscanf(data, "%30d|%30d", &silencereqd, &iterations) != 2) &&
+ (sscanf(data, "%30d", &silencereqd) != 1) ) ) {
ast_log(LOG_WARNING, "Using default value of 1000ms, 1 iteration, no timeout\n");
}
diff --git a/asterisk-1.4.26-summary.html b/asterisk-1.4.26-summary.html
deleted file mode 100644
index 2a84e413d..000000000
--- a/asterisk-1.4.26-summary.html
+++ /dev/null
@@ -1,674 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.4.26</title></head>
-<body>
-<h1 align="center"><a name="top">Release Summary</a></h1>
-<h3 align="center">asterisk-1.4.26</h3>
-<h3 align="center">Date: 2009-07-20</h3>
-<h3 align="center">&lt;asteriskteam@digium.com&gt;</h3>
-<hr/>
-<h2 align="center">Table of Contents</h2>
-<ol>
- <li><a href="#summary">Summary</a></li>
- <li><a href="#contributors">Contributors</a></li>
- <li><a href="#issues">Closed Issues</a></li>
- <li><a href="#commits">Other Changes</a></li>
- <li><a href="#diffstat">Diffstat</a></li>
-</ol>
-<hr/>
-<a name="summary"><h2 align="center">Summary</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
-<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.4.25.</p>
-<hr/>
-<a name="contributors"><h2 align="center">Contributors</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
-<table width="100%" border="0">
-<tr>
-<td width="33%"><h3>Coders</h3></td>
-<td width="33%"><h3>Testers</h3></td>
-<td width="33%"><h3>Reporters</h3></td>
-</tr>
-<tr valign="top">
-<td>
-20 mmichelson<br/>
-19 dvossel<br/>
-13 seanbright<br/>
-8 russell<br/>
-7 rmudgett<br/>
-7 tilghman<br/>
-5 mnicholson<br/>
-4 jpeeler<br/>
-3 alecdavis<br/>
-2 dbrooks<br/>
-2 eliel<br/>
-2 file<br/>
-2 guillecabeza<br/>
-2 klaus3000<br/>
-2 kpfleming<br/>
-2 lmadsen<br/>
-2 p<br/>
-2 qwell<br/>
-2 twilson<br/>
-1 adomjan<br/>
-1 garlew<br/>
-1 Jamuel<br/>
-1 lacoursj<br/>
-1 latinsud<br/>
-1 murf<br/>
-1 Nick<br/>
-1 oej<br/>
-1 phsultan<br/>
-1 srt<br/>
-1 tzafrir<br/>
-</td>
-<td>
-6 dvossel<br/>
-5 aragon<br/>
-4 dbrooks<br/>
-4 p_lindheimer<br/>
-3 alecdavis<br/>
-3 scottbmilne<br/>
-3 seanbright<br/>
-2 guillecabeza<br/>
-2 klaus3000<br/>
-2 loloski<br/>
-2 mnicholson<br/>
-2 rmudgett<br/>
-2 sh0t<br/>
-2 sum<br/>
-1 amilcar<br/>
-1 andrebarbosa<br/>
-1 Jamuel<br/>
-1 lacoursj<br/>
-1 legart<br/>
-1 lmadsen<br/>
-1 madkins<br/>
-1 manwe<br/>
-1 murf<br/>
-1 Nick_Lewis<br/>
-1 snblitz<br/>
-1 tootai<br/>
-1 volivier<br/>
-</td>
-<td>
-4 p_lindheimer<br/>
-3 aragon<br/>
-3 klaus3000<br/>
-2 ibc<br/>
-2 loloski<br/>
-2 sodom<br/>
-1 adomjan<br/>
-1 alecdavis<br/>
-1 alexh<br/>
-1 andrebarbosa<br/>
-1 Andrey Sofronov<br/>
-1 avinoash<br/>
-1 cmoss28<br/>
-1 davidw<br/>
-1 deepesh<br/>
-1 dimas<br/>
-1 eboscani<br/>
-1 festr<br/>
-1 ffloimair<br/>
-1 flefoll<br/>
-1 fvdb<br/>
-1 garlew<br/>
-1 geoffs<br/>
-1 greenfieldtech<br/>
-1 guillecabeza<br/>
-1 hotsblanc<br/>
-1 Jamuel<br/>
-1 jkroon<br/>
-1 jpiszcz<br/>
-1 lacoursj<br/>
-1 latinsud<br/>
-1 legart<br/>
-1 lidocaineus<br/>
-1 lmadsen<br/>
-1 lmamane<br/>
-1 madkins<br/>
-1 markd<br/>
-1 mbrancaleoni<br/>
-1 meral<br/>
-1 Nick_Lewis<br/>
-1 okrief<br/>
-1 paravoid<br/>
-1 pdavis<br/>
-1 pj<br/>
-1 pkempgen<br/>
-1 ramonpeek<br/>
-1 samy<br/>
-1 schmidts<br/>
-1 scottbmilne<br/>
-1 seandarcy<br/>
-1 sh0t<br/>
-1 srt<br/>
-1 sum<br/>
-1 timking<br/>
-1 travisghansen<br/>
-1 volivier<br/>
-</td>
-</tr>
-</table>
-<hr/>
-<a name="issues"><h2 align="center">Closed Issues</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
-<h3>Category: Applications/General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15022">#15022</a>: [patch] Language handling for numbers, dates, etc is misbehaving when utilizing sub-regional languages<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204556">204556</a><br/>
-Reporter: greenfieldtech<br/>
-Coders: tilghman<br/>
-<br/>
-<h3>Category: Applications/app_dial</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15056">#15056</a>: [patch] Blank FORWARD_CONTEXT is not ignored<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198251">198251</a><br/>
-Reporter: p_lindheimer<br/>
-Testers: p_lindheimer<br/>
-Coders: seanbright<br/>
-<br/>
-<h3>Category: Applications/app_forkcdr</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=13797">#13797</a>: [patch] forkcdr() doesn't fork when call disposition is ANSWERED<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=195881">195881</a><br/>
-Reporter: sh0t<br/>
-Testers: sh0t<br/>
-Coders: mnicholson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14744">#14744</a>: ForkCDR creates 3 CDR's<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=195881">195881</a><br/>
-Reporter: deepesh<br/>
-Testers: sh0t<br/>
-Coders: mnicholson<br/>
-<br/>
-<h3>Category: Applications/app_mixmonitor</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=13745">#13745</a>: Recordings out of sync when using chanspy<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197537">197537</a><br/>
-Reporter: geoffs<br/>
-Testers: snblitz<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15259">#15259</a>: MixMonitor is not releasing the file handle on the recorded file<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201423">201423</a><br/>
-Reporter: travisghansen<br/>
-Testers: dvossel<br/>
-Coders: dvossel<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15400">#15400</a>: /include/asterisk/lock.h:531 __ast_pthread_mutex_unlock: app_mixmonitor.c line 277 (mixmonitor_thread): Error releasing mutex: O<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204012">204012</a><br/>
-Reporter: aragon<br/>
-Coders: mmichelson<br/>
-<br/>
-<h3>Category: Applications/app_queue</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14631">#14631</a>: [patch] Ghost calls with queues and spa942 and 922<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205349">205349</a><br/>
-Reporter: latinsud<br/>
-Coders: latinsud<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15122">#15122</a>: Abandoned queue calls won't show on CDR<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198068">198068</a><br/>
-Reporter: sum<br/>
-Testers: mnicholson, dbrooks, sum<br/>
-Coders: mnicholson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15198">#15198</a>: [patch] adding queue member from asterisk console with state_interface parameter not working<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197024">197024</a><br/>
-Reporter: loloski<br/>
-Testers: loloski<br/>
-Coders: seanbright<br/>
-<br/>
-<h3>Category: Applications/app_voicemail</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14554">#14554</a>: [patch] # for fastforward goes beyond end of message<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203785">203785</a><br/>
-Reporter: lacoursj<br/>
-Testers: lacoursj<br/>
-Coders: lacoursj<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14932">#14932</a>: [patch] asterisk-1.6.0.9-x86_64 segfaults when leaving a voicemail internally to another extension<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199626">199626</a><br/>
-Reporter: jpiszcz<br/>
-Testers: seanbright<br/>
-Coders: seanbright<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15331">#15331</a>: [patch] Log message does not match conditional check<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203719">203719</a><br/>
-Reporter: markd<br/>
-Coders: dbrooks<br/>
-<br/>
-<h3>Category: CDR/General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=12946">#12946</a>: [patch] ResetCDR does not work on non-answered channel<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198068">198068</a><br/>
-Reporter: meral<br/>
-Testers: mnicholson, dbrooks, sum<br/>
-Coders: mnicholson<br/>
-<br/>
-<h3>Category: Channels/General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15330">#15330</a>: [patch] Using CHANNEL function from ZOMBIE channel stops Asterisk<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201380">201380</a><br/>
-Reporter: okrief<br/>
-Testers: dbrooks<br/>
-Coders: dbrooks<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15416">#15416</a>: No voice on PRI calls with asterisk 1.4.25 & 26<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205728">205728</a><br/>
-Reporter: avinoash<br/>
-Testers: scottbmilne, alecdavis<br/>
-Coders: alecdavis<br/>
-<br/>
-<h3>Category: Channels/chan_dahdi</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14383">#14383</a>: priexclusive parameter ignored if pri = pri_cpe ?<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203908">203908</a><br/>
-Reporter: mbrancaleoni<br/>
-Coders: rmudgett<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14471">#14471</a>: [patch] Making outgoing calls DTMF can't be detected<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=207092">207092</a><br/>
-Reporter: eboscani<br/>
-Coders: jpeeler<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14477">#14477</a>: pseudo channel disappears after dahdi restart<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203848">203848</a><br/>
-Reporter: timking<br/>
-Coders: jpeeler<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14726">#14726</a>: Conditional compilation of a diagnostic message needs an L modifier to %d for a 64 bit integer<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=207155">207155</a><br/>
-Reporter: lmadsen<br/>
-Coders: jpeeler<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15389">#15389</a>: [patch] no audio with SIP call to ISDN PRI, if neither Progress or Proceeding are received.<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205728">205728</a><br/>
-Reporter: alecdavis<br/>
-Testers: scottbmilne, alecdavis<br/>
-Coders: alecdavis<br/>
-<br/>
-<h3>Category: Channels/chan_iax2</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14216">#14216</a>: Random audio dropouts when jitterbuffer = yes<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=195991">195991</a><br/>
-Reporter: Andrey Sofronov<br/>
-Testers: guillecabeza<br/>
-Coders: guillecabeza<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15032">#15032</a>: [patch] Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer.<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=195991">195991</a><br/>
-Reporter: guillecabeza<br/>
-Testers: guillecabeza<br/>
-Coders: guillecabeza<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15361">#15361</a>: [patch] AST-2009-001 breaks IAX2 RFC5456 compliance - Timestamps in POKE/PONG zero in 2 of 4 Bytes<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201993">201993</a><br/>
-Reporter: ffloimair<br/>
-Coders: dvossel<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15377">#15377</a>: [patch] segfault in iax2_hangup Asterisk revision 201600<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204067">204067</a><br/>
-Reporter: aragon<br/>
-Testers: aragon, dvossel<br/>
-Coders: dvossel<br/>
-<br/>
-<h3>Category: Channels/chan_misdn</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=11974">#11974</a>: external lines connected with message !! Got Busy in Connected State !?!<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204834">204834</a><br/>
-Reporter: fvdb<br/>
-Coders: rmudgett<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=12286">#12286</a>: [patch] immediate=yes treats s extension differently than others: doesn't return cause code 1 if doesn't exist<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=196116">196116</a><br/>
-Reporter: lmamane<br/>
-Coders: file<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14355">#14355</a>: [patch] Segfault if you transfer a call into a meetme room<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206487">206487</a><br/>
-Reporter: sodom<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14692">#14692</a>: [patch] ISDN-Transfer causes backcall attempt of attendent phone<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206487">206487</a><br/>
-Reporter: sodom<br/>
-Testers: rmudgett<br/>
-Coders: rmudgett<br/>
-<br/>
-<h3>Category: Channels/chan_sip/General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=11231">#11231</a>: [patch] Many retransmits when chan_sip generates multiple outstanding requests<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204243">204243</a><br/>
-Reporter: flefoll<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=13432">#13432</a>: [patch] outboundproxy=proxy.mmmydomain.net where domain can not be resolved silently removes the sip section<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204300">204300</a><br/>
-Reporter: p_lindheimer<br/>
-Coders: p<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=13823">#13823</a>: Response to REGISTER is sent to wrong address when using rport<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197466">197466</a><br/>
-Reporter: dimas<br/>
-Coders: file<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14464">#14464</a>: [patch] lock during simple call processing<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202336">202336</a><br/>
-Reporter: pj<br/>
-Testers: aragon<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14659">#14659</a>: [patch] MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port (5060)<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202671">202671</a><br/>
-Reporter: klaus3000<br/>
-Testers: dvossel, klaus3000<br/>
-Coders: klaus3000, dvossel<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15213">#15213</a>: [patch] asterisk lock in sipsock_read for several seconds and drop sip packets<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202336">202336</a><br/>
-Reporter: schmidts<br/>
-Testers: aragon<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15345">#15345</a>: [patch] SIP deadlock in 1.4 revision 199472<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202336">202336</a><br/>
-Reporter: aragon<br/>
-Testers: aragon<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15349">#15349</a>: Deadlock in do_monitor() of chan_sip<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202336">202336</a><br/>
-Reporter: samy<br/>
-Testers: aragon<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15366">#15366</a>: recent commit on svn 1.4 chan_sip failed to load<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202153">202153</a><br/>
-Reporter: loloski<br/>
-Coders: seanbright<br/>
-<br/>
-<h3>Category: Channels/chan_sip/Interoperability</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=13630">#13630</a>: [patch] Potential spiral detected problem<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198891">198891</a><br/>
-Reporter: festr<br/>
-Coders: dvossel<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14465">#14465</a>: [patch] Incorrect From: header information when CALLERPRES=PRES_PROHIB<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206938">206938</a><br/>
-Reporter: Nick_Lewis<br/>
-Testers: Nick_Lewis, dvossel<br/>
-Coders: Nick, dvossel<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14584">#14584</a>: [patch] Asterisk does not stop retransmission<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202341">202341</a><br/>
-Reporter: klaus3000<br/>
-Testers: klaus3000<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=14725">#14725</a>: Asterisk doesn't add Route headers in NOTIFY when the SUBSCRIBE came from a proxy<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205775">205775</a><br/>
-Reporter: ibc<br/>
-Coders: mmichelson<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15158">#15158</a>: [patch] Message: "Unable to handle indication 3"<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=200360">200360</a><br/>
-Reporter: madkins<br/>
-Testers: madkins<br/>
-Coders: mmichelson<br/>
-<br/>
-<h3>Category: Channels/chan_sip/Registration</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15102">#15102</a>: [patch] Registration Deadlock between Asterisk and Polycom Soundpoint IP 450<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205804">205804</a><br/>
-Reporter: Jamuel<br/>
-Testers: Jamuel<br/>
-Coders: Jamuel, dvossel<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15194">#15194</a>: [patch] [SIP realtime] "sip reload" makes UNREACHABLE users behind NAT<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197562">197562</a><br/>
-Reporter: ibc<br/>
-Testers: manwe<br/>
-Coders: eliel<br/>
-<br/>
-<h3>Category: Core/BuildSystem</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15209">#15209</a>: make install: build_tools/mkpkgconfig: 21: [[: not found<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197264">197264</a><br/>
-Reporter: seandarcy<br/>
-Coders: seanbright<br/>
-<br/>
-<h3>Category: Core/General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=13778">#13778</a>: asterisk blocked at startup between main/asterisk.c/loader.c/load_modules and manager.c/loader.c/ast_module_reload<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199022">199022</a><br/>
-Reporter: hotsblanc<br/>
-Testers: p_lindheimer, seanbright<br/>
-Coders: seanbright<br/>
-<br/>
-<h3>Category: Core/Internationalization</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15346">#15346</a>: [patch] TW is not an ISO Language Code<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204469">204469</a><br/>
-Reporter: volivier<br/>
-Testers: volivier<br/>
-Coders: tilghman<br/>
-<br/>
-<h3>Category: Core/PBX</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14702">#14702</a>: [patch] debugging CID matching<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206126">206126</a><br/>
-Reporter: klaus3000<br/>
-Coders: klaus3000<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15057">#15057</a>: [patch] hints with 2+ devices that include ONHOLD are often set wrong<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199297">199297</a><br/>
-Reporter: p_lindheimer<br/>
-Testers: p_lindheimer, dvossel<br/>
-Coders: dvossel, p<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15189">#15189</a>: [patch] #exec script can't access manager on first asterisk load<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199022">199022</a><br/>
-Reporter: p_lindheimer<br/>
-Testers: p_lindheimer, seanbright<br/>
-Coders: seanbright<br/>
-<br/>
-<h3>Category: Documentation</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15518">#15518</a>: iax.conf, IP-based access control<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206872">206872</a><br/>
-Reporter: pkempgen<br/>
-Coders: dvossel<br/>
-<br/>
-<h3>Category: Functions/func_cut</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15208">#15208</a>: [patch] The CUT function does not show the leading field-separators until it finds a value.<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197194">197194</a><br/>
-Reporter: ramonpeek<br/>
-Coders: tilghman<br/>
-<br/>
-<h3>Category: Functions/func_devstate</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15413">#15413</a>: [patch] Mapping of extension state to device state is incorrect<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204681">204681</a><br/>
-Reporter: legart<br/>
-Testers: dvossel, legart, amilcar<br/>
-Coders: dvossel<br/>
-<br/>
-<h3>Category: Functions/func_odbc</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15317">#15317</a>: func_odbc is broken in 1.4.25<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204170">204170</a><br/>
-Reporter: alexh<br/>
-Coders: tilghman<br/>
-<br/>
-<h3>Category: Functions/func_realtime</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15517">#15517</a>: [patch] memory leak in func_realtime<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206807">206807</a><br/>
-Reporter: adomjan<br/>
-Coders: adomjan<br/>
-<br/>
-<h3>Category: General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15225">#15225</a>: make config on slackware<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197998">197998</a><br/>
-Reporter: pdavis<br/>
-Coders: seanbright<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15420">#15420</a>: [patch] No audio on calls from asterisk sip phones to nortel set until dtmf from sip phone<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205728">205728</a><br/>
-Reporter: scottbmilne<br/>
-Testers: scottbmilne, alecdavis<br/>
-Coders: alecdavis<br/>
-<br/>
-<h3>Category: PBX/pbx_spool</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15072">#15072</a>: [patch] Possible crash in pbx_spool.c - operation on previously freed structure<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198957">198957</a><br/>
-Reporter: garlew<br/>
-Coders: garlew<br/>
-<br/>
-<h3>Category: Resources/res_convert</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=15181">#15181</a>: [patch] file convert leaks input file descriptor<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=196826">196826</a><br/>
-Reporter: jkroon<br/>
-Coders: russell<br/>
-<br/>
-<h3>Category: Resources/res_features</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=13794">#13794</a>: [patch] CDR for picked up parked call gives answer time < start time and no record for parking<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203375">203375</a><br/>
-Reporter: davidw<br/>
-Testers: murf, dbrooks<br/>
-Coders: murf<br/>
-<br/>
-<a href="http://bugs.digium.com/view.php?id=15183">#15183</a>: [patch] Attended Transfers are not working<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197124">197124</a><br/>
-Reporter: andrebarbosa<br/>
-Testers: andrebarbosa, tootai, loloski<br/>
-Coders: jpeeler<br/>
-<br/>
-<h3>Category: Resources/res_jabber</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14876">#14876</a>: [patch] Missing \r\n in response to JabberSend manager action<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198370">198370</a><br/>
-Reporter: srt<br/>
-Coders: seanbright, srt, phsultan<br/>
-<br/>
-<h3>Category: Resources/res_musiconhold</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14759">#14759</a>: [patch] Asterisk commands "moh reload" or "reload res_musiconhold.so" causes MOH not to work properly<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198665">198665</a><br/>
-Reporter: lidocaineus<br/>
-Testers: lmadsen<br/>
-Coders: tilghman<br/>
-<br/>
-<h3>Category: Resources/res_smdi</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=14561">#14561</a>: When using SMDI Asterisk crashes after message is left<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=198311">198311</a><br/>
-Reporter: cmoss28<br/>
-Coders: russell<br/>
-<br/>
-<h3>Category: Utilities/General</h3><br/>
-<a href="http://bugs.digium.com/view.php?id=10812">#10812</a>: [patch] safe_asterisk includes bashisms<br/>
-Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=196657">196657</a><br/>
-Reporter: paravoid<br/>
-Coders: tzafrir<br/>
-<br/>
-<hr/>
-<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
-<table width="100%" border="1">
-<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197259">197259</a></td><td>oej</td><td>Typo fix</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197588">197588</a></td><td>mmichelson</td><td>Allow for media to arrive from an alternate source when responding to a reinvite with 491.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197620">197620</a></td><td>dvossel</td><td>'iax show peer blah' now outputs whether or not peer 'blah' is in trunk mode or not.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=197895">197895</a></td><td>lmadsen</td><td>Update MixMonitor documentation.</td>
-<td><a href="http://bugs.digium.com/view.php?id=14829">#14829</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199138">199138</a></td><td>dvossel</td><td>Additional updates to AST-2009-001</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199628">199628</a></td><td>seanbright</td><td>Fix a typo in the stack size calculation just introduced.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=199856">199856</a></td><td>seanbright</td><td>__WORDSIZE is not available on all platforms, so use sizeof(void *) instead.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=200037">200037</a></td><td>lmadsen</td><td>Fix path for .flavor and .version.</td>
-<td><a href="http://bugs.digium.com/view.php?id=14737">#14737</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=200185">200185</a></td><td>seanbright</td><td>Backport fix for parallel build warnings from trunk r199781.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=200513">200513</a></td><td>mmichelson</td><td>Add INFO to our allowed methods so that endpoints know they may send it to us.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=200875">200875</a></td><td>eliel</td><td>Show the interface name on error, if it is not found.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=200991">200991</a></td><td>kpfleming</td><td>Improve support for media paths that can generate multiple frames at once.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201261">201261</a></td><td>kpfleming</td><td>Correct AST_LIST_APPEND_LIST behavior when list to be appended is empty.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201450">201450</a></td><td>mmichelson</td><td>Change the datastore traversal in ast_do_masquerade to use a safe list traversal.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201600">201600</a></td><td>russell</td><td>Fix memory corruption and leakage related reloads of non files mode MoH classes.</td>
-<td><a href="http://bugs.digium.com/view.php?id=15109">#15109</a>, <a href="http://bugs.digium.com/view.php?id=15123">#15123</a>, <a href="http://bugs.digium.com/view.php?id=15195">#15195</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=201828">201828</a></td><td>tilghman</td><td>If the "h" extension fails, give it another chance in main/pbx.c.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202022">202022</a></td><td>mnicholson</td><td>Added deadlock protection to try_suggested_sip_codec in chan_sip.c.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202342">202342</a></td><td>mmichelson</td><td>Remove an extra debug line left from previous commit.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202414">202414</a></td><td>russell</td><td>Make Polycom subscription type override check more explicit.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202496">202496</a></td><td>russell</td><td>Report CallerID change during a masquerade.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202572">202572</a></td><td>mmichelson</td><td>Fix potential memory leak in chan_sip when video rtp is not allocated properly.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202601">202601</a></td><td>mmichelson</td><td>Fix more memory leaks that may result if rtp is not successfully allocated.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=202966">202966</a></td><td>mmichelson</td><td>Use the handy UNLINK macro instead of hand-coding the same thing in-line.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203036">203036</a></td><td>rmudgett</td><td>Improved chan_dahdi.conf pritimer error checking.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203115">203115</a></td><td>russell</td><td>Resolve a crash related to a T.38 reinvite race condition.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203230">203230</a></td><td>mmichelson</td><td>Prevent false positives when freeing a NULL pointer with MALLOC_DEBUG enabled.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203311">203311</a></td><td>twilson</td><td>Don't try to free NULL</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=203380">203380</a></td><td>twilson</td><td>I didn't see that Mark already fixed the underlying issue!</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204246">204246</a></td><td>mmichelson</td><td>Fix build oops.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204474">204474</a></td><td>qwell</td><td>Fix ast_say_counted_noun to correctly handle Polish. Fix a comment typo in passing.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=204755">204755</a></td><td>dvossel</td><td>moving device state functions from pbx.h to devicestate.h to sync with other branches</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205149">205149</a></td><td>russell</td><td>Make OpenSSL usage thread-safe.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205188">205188</a></td><td>tilghman</td><td>Add redirection warnings for the invalid language codes previously removed.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205215">205215</a></td><td>dvossel</td><td>ast_samp2tv needs floating point for 16khz audio</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205288">205288</a></td><td>qwell</td><td>Update config.guess and config.sub from the savannah.gnu.org git repo.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205409">205409</a></td><td>dvossel</td><td>moving ast_devstate_to_extenstate to pbx.c from devicestate.c</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205471">205471</a></td><td>dvossel</td><td>Fixes 8khz assumptions</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205599">205599</a></td><td>dvossel</td><td>Changing ast_samp2tv to not use floating point.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=205877">205877</a></td><td>mmichelson</td><td>Properly ACK 487 responses to canceled INVITEs.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206284">206284</a></td><td>rmudgett</td><td>Fix some memory leaks in chan_misdn.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206385">206385</a></td><td>russell</td><td>Ensure apathetic replies are sent out on the proper socket.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206635">206635</a></td><td>seanbright</td><td>Only print debug info in codec_dahdi if we are asking for it.</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206706">206706</a></td><td>rmudgett</td><td>Merged revision 206700 from</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=206867">206867</a></td><td>dvossel</td><td>avoid segfault caused by user error</td>
-<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=207033">207033</a></td><td>dvossel</td><td>sip option flags handled incorrectly</td>
-<td><a href="http://bugs.digium.com/view.php?id=15376">#15376</a></td></tr></table>
-<hr/>
-<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
-<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
-<pre>
-Makefile | 14
-UPGRADE.txt | 10
-apps/app_chanspy.c | 20
-apps/app_dial.c | 3
-apps/app_meetme.c | 16
-apps/app_mixmonitor.c | 98 +++-
-apps/app_queue.c | 9
-apps/app_voicemail.c | 2
-build_tools/cflags-devmode.xml | 2
-build_tools/make_version_h | 6
-channels/chan_dahdi.c | 99 +++-
-channels/chan_iax2.c | 63 ++-
-channels/chan_misdn.c | 785 +++++++++++++++++++++++----------------
-channels/chan_sip.c | 362 +++++++++++++----
-channels/misdn/isdn_lib.c | 155 ++++---
-channels/misdn/isdn_lib.h | 3
-channels/misdn/isdn_lib_intern.h | 1
-codecs/codec_dahdi.c | 12
-config.guess | 168 +++++---
-config.sub | 160 ++++++-
-configs/chan_dahdi.conf.sample | 5
-configs/iax.conf.sample | 2
-contrib/scripts/safe_asterisk | 8
-doc/asterisk-conf.txt | 4
-funcs/func_cut.c | 11
-funcs/func_odbc.c | 11
-funcs/func_realtime.c | 2
-funcs/func_strings.c | 26 -
-include/asterisk.h | 12
-include/asterisk/audiohook.h | 4
-include/asterisk/cdr.h | 19
-include/asterisk/channel.h | 36 +
-include/asterisk/devicestate.h | 81 +++-
-include/asterisk/frame.h | 11
-include/asterisk/linkedlists.h | 39 +
-include/asterisk/pbx.h | 9
-include/asterisk/rtp.h | 17
-include/asterisk/time.h | 2
-include/asterisk/utils.h | 6
-main/asterisk.c | 17
-main/astmm.c | 8
-main/audiohook.c | 12
-main/autoservice.c | 17
-main/callerid.c | 4
-main/cdr.c | 36 +
-main/channel.c | 394 ++++++++++++++-----
-main/cli.c | 1
-main/devicestate.c | 108 ++++-
-main/file.c | 25 -
-main/frame.c | 125 ++----
-main/loader.c | 81 ++++
-main/pbx.c | 138 +++---
-main/rtp.c | 71 ++-
-main/say.c | 505 ++++++++++++++-----------
-main/slinfactory.c | 30 -
-pbx/pbx_spool.c | 6
-res/res_convert.c | 4
-res/res_crypto.c | 46 ++
-res/res_features.c | 45 +-
-res/res_jabber.c | 16
-res/res_musiconhold.c | 20
-res/res_smdi.c | 4
-62 files changed, 2676 insertions(+), 1330 deletions(-)
-</pre><br/>
-<hr/>
-</body>
-</html>
diff --git a/asterisk-1.4.26-summary.txt b/asterisk-1.4.26-summary.txt
deleted file mode 100644
index f8b62b5bc..000000000
--- a/asterisk-1.4.26-summary.txt
+++ /dev/null
@@ -1,808 +0,0 @@
- Release Summary
-
- asterisk-1.4.26
-
- Date: 2009-07-20
-
- <asteriskteam@digium.com>
-
- ----------------------------------------------------------------------
-
- Table of Contents
-
- 1. Summary
- 2. Contributors
- 3. Closed Issues
- 4. Other Changes
- 5. Diffstat
-
- ----------------------------------------------------------------------
-
- Summary
-
- [Back to Top]
-
- This release includes only bug fixes. The changes included were made only
- to address problems that have been identified in this release series.
- Users should be able to safely upgrade to this version if this release
- series is already in use. Users considering upgrading from a previous
- release series are strongly encouraged to review the UPGRADE.txt document
- as well as the CHANGES document for information about upgrading to this
- release series.
-
- The data in this summary reflects changes that have been made since the
- previous release, asterisk-1.4.25.
-
- ----------------------------------------------------------------------
-
- Contributors
-
- [Back to Top]
-
- This table lists the people who have submitted code, those that have
- tested patches, as well as those that reported issues on the issue tracker
- that were resolved in this release. For coders, the number is how many of
- their patches (of any size) were committed into this release. For testers,
- the number is the number of times their name was listed as assisting with
- testing a patch. Finally, for reporters, the number is the number of
- issues that they reported that were closed by commits that went into this
- release.
-
- Coders Testers Reporters
- 20 mmichelson 6 dvossel 4 p_lindheimer
- 19 dvossel 5 aragon 3 aragon
- 13 seanbright 4 dbrooks 3 klaus3000
- 8 russell 4 p_lindheimer 2 ibc
- 7 rmudgett 3 alecdavis 2 loloski
- 7 tilghman 3 scottbmilne 2 sodom
- 5 mnicholson 3 seanbright 1 adomjan
- 4 jpeeler 2 guillecabeza 1 alecdavis
- 3 alecdavis 2 klaus3000 1 alexh
- 2 dbrooks 2 loloski 1 andrebarbosa
- 2 eliel 2 mnicholson 1 Andrey Sofronov
- 2 file 2 rmudgett 1 avinoash
- 2 guillecabeza 2 sh0t 1 cmoss28
- 2 klaus3000 2 sum 1 davidw
- 2 kpfleming 1 amilcar 1 deepesh
- 2 lmadsen 1 andrebarbosa 1 dimas
- 2 p 1 Jamuel 1 eboscani
- 2 qwell 1 lacoursj 1 festr
- 2 twilson 1 legart 1 ffloimair
- 1 adomjan 1 lmadsen 1 flefoll
- 1 garlew 1 madkins 1 fvdb
- 1 Jamuel 1 manwe 1 garlew
- 1 lacoursj 1 murf 1 geoffs
- 1 latinsud 1 Nick_Lewis 1 greenfieldtech
- 1 murf 1 snblitz 1 guillecabeza
- 1 Nick 1 tootai 1 hotsblanc
- 1 oej 1 volivier 1 Jamuel
- 1 phsultan 1 jkroon
- 1 srt 1 jpiszcz
- 1 tzafrir 1 lacoursj
- 1 latinsud
- 1 legart
- 1 lidocaineus
- 1 lmadsen
- 1 lmamane
- 1 madkins
- 1 markd
- 1 mbrancaleoni
- 1 meral
- 1 Nick_Lewis
- 1 okrief
- 1 paravoid
- 1 pdavis
- 1 pj
- 1 pkempgen
- 1 ramonpeek
- 1 samy
- 1 schmidts
- 1 scottbmilne
- 1 seandarcy
- 1 sh0t
- 1 srt
- 1 sum
- 1 timking
- 1 travisghansen
- 1 volivier
-
- ----------------------------------------------------------------------
-
- Closed Issues
-
- [Back to Top]
-
- This is a list of all issues from the issue tracker that were closed by
- changes that went into this release.
-
- Category: Applications/General
-
- #15022: [patch] Language handling for numbers, dates, etc is misbehaving
- when utilizing sub-regional languages
- Revision: 204556
- Reporter: greenfieldtech
- Coders: tilghman
-
- Category: Applications/app_dial
-
- #15056: [patch] Blank FORWARD_CONTEXT is not ignored
- Revision: 198251
- Reporter: p_lindheimer
- Testers: p_lindheimer
- Coders: seanbright
-
- Category: Applications/app_forkcdr
-
- #13797: [patch] forkcdr() doesn't fork when call disposition is ANSWERED
- Revision: 195881
- Reporter: sh0t
- Testers: sh0t
- Coders: mnicholson
-
- #14744: ForkCDR creates 3 CDR's
- Revision: 195881
- Reporter: deepesh
- Testers: sh0t
- Coders: mnicholson
-
- Category: Applications/app_mixmonitor
-
- #13745: Recordings out of sync when using chanspy
- Revision: 197537
- Reporter: geoffs
- Testers: snblitz
- Coders: mmichelson
-
- #15259: MixMonitor is not releasing the file handle on the recorded file
- Revision: 201423
- Reporter: travisghansen
- Testers: dvossel
- Coders: dvossel
-
- #15400: /include/asterisk/lock.h:531 __ast_pthread_mutex_unlock:
- app_mixmonitor.c line 277 (mixmonitor_thread): Error releasing mutex: O
- Revision: 204012
- Reporter: aragon
- Coders: mmichelson
-
- Category: Applications/app_queue
-
- #14631: [patch] Ghost calls with queues and spa942 and 922
- Revision: 205349
- Reporter: latinsud
- Coders: latinsud
-
- #15122: Abandoned queue calls won't show on CDR
- Revision: 198068
- Reporter: sum
- Testers: mnicholson, dbrooks, sum
- Coders: mnicholson
-
- #15198: [patch] adding queue member from asterisk console with
- state_interface parameter not working
- Revision: 197024
- Reporter: loloski
- Testers: loloski
- Coders: seanbright
-
- Category: Applications/app_voicemail
-
- #14554: [patch] # for fastforward goes beyond end of message
- Revision: 203785
- Reporter: lacoursj
- Testers: lacoursj
- Coders: lacoursj
-
- #14932: [patch] asterisk-1.6.0.9-x86_64 segfaults when leaving a voicemail
- internally to another extension
- Revision: 199626
- Reporter: jpiszcz
- Testers: seanbright
- Coders: seanbright
-
- #15331: [patch] Log message does not match conditional check
- Revision: 203719
- Reporter: markd
- Coders: dbrooks
-
- Category: CDR/General
-
- #12946: [patch] ResetCDR does not work on non-answered channel
- Revision: 198068
- Reporter: meral
- Testers: mnicholson, dbrooks, sum
- Coders: mnicholson
-
- Category: Channels/General
-
- #15330: [patch] Using CHANNEL function from ZOMBIE channel stops Asterisk
- Revision: 201380
- Reporter: okrief
- Testers: dbrooks
- Coders: dbrooks
-
- #15416: No voice on PRI calls with asterisk 1.4.25 & 26
- Revision: 205728
- Reporter: avinoash
- Testers: scottbmilne, alecdavis
- Coders: alecdavis
-
- Category: Channels/chan_dahdi
-
- #14383: priexclusive parameter ignored if pri = pri_cpe ?
- Revision: 203908
- Reporter: mbrancaleoni
- Coders: rmudgett
-
- #14471: [patch] Making outgoing calls DTMF can't be detected
- Revision: 207092
- Reporter: eboscani
- Coders: jpeeler
-
- #14477: pseudo channel disappears after dahdi restart
- Revision: 203848
- Reporter: timking
- Coders: jpeeler
-
- #14726: Conditional compilation of a diagnostic message needs an L
- modifier to %d for a 64 bit integer
- Revision: 207155
- Reporter: lmadsen
- Coders: jpeeler
-
- #15389: [patch] no audio with SIP call to ISDN PRI, if neither Progress or
- Proceeding are received.
- Revision: 205728
- Reporter: alecdavis
- Testers: scottbmilne, alecdavis
- Coders: alecdavis
-
- Category: Channels/chan_iax2
-
- #14216: Random audio dropouts when jitterbuffer = yes
- Revision: 195991
- Reporter: Andrey Sofronov
- Testers: guillecabeza
- Coders: guillecabeza
-
- #15032: [patch] Sign problem calculating timestamp for iax frame leads to
- no audio on the receiving peer.
- Revision: 195991
- Reporter: guillecabeza
- Testers: guillecabeza
- Coders: guillecabeza
-
- #15361: [patch] AST-2009-001 breaks IAX2 RFC5456 compliance - Timestamps
- in POKE/PONG zero in 2 of 4 Bytes
- Revision: 201993
- Reporter: ffloimair
- Coders: dvossel
-
- #15377: [patch] segfault in iax2_hangup Asterisk revision 201600
- Revision: 204067
- Reporter: aragon
- Testers: aragon, dvossel
- Coders: dvossel
-
- Category: Channels/chan_misdn
-
- #11974: external lines connected with message !! Got Busy in Connected
- State !?!
- Revision: 204834
- Reporter: fvdb
- Coders: rmudgett
-
- #12286: [patch] immediate=yes treats s extension differently than others:
- doesn't return cause code 1 if doesn't exist
- Revision: 196116
- Reporter: lmamane
- Coders: file
-
- #14355: [patch] Segfault if you transfer a call into a meetme room
- Revision: 206487
- Reporter: sodom
- Testers: rmudgett
- Coders: rmudgett
-
- #14692: [patch] ISDN-Transfer causes backcall attempt of attendent phone
- Revision: 206487
- Reporter: sodom
- Testers: rmudgett
- Coders: rmudgett
-
- Category: Channels/chan_sip/General
-
- #11231: [patch] Many retransmits when chan_sip generates multiple
- outstanding requests
- Revision: 204243
- Reporter: flefoll
- Coders: mmichelson
-
- #13432: [patch] outboundproxy=proxy.mmmydomain.net where domain can not be
- resolved silently removes the sip section
- Revision: 204300
- Reporter: p_lindheimer
- Coders: p
-
- #13823: Response to REGISTER is sent to wrong address when using rport
- Revision: 197466
- Reporter: dimas
- Coders: file
-
- #14464: [patch] lock during simple call processing
- Revision: 202336
- Reporter: pj
- Testers: aragon
- Coders: mmichelson
-
- #14659: [patch] MWI NOTIFY contains a wrong URI if Asterisk listens to
- non-standard port (5060)
- Revision: 202671
- Reporter: klaus3000
- Testers: dvossel, klaus3000
- Coders: klaus3000, dvossel
-
- #15213: [patch] asterisk lock in sipsock_read for several seconds and drop
- sip packets
- Revision: 202336
- Reporter: schmidts
- Testers: aragon
- Coders: mmichelson
-
- #15345: [patch] SIP deadlock in 1.4 revision 199472
- Revision: 202336
- Reporter: aragon
- Testers: aragon
- Coders: mmichelson
-
- #15349: Deadlock in do_monitor() of chan_sip
- Revision: 202336
- Reporter: samy
- Testers: aragon
- Coders: mmichelson
-
- #15366: recent commit on svn 1.4 chan_sip failed to load
- Revision: 202153
- Reporter: loloski
- Coders: seanbright
-
- Category: Channels/chan_sip/Interoperability
-
- #13630: [patch] Potential spiral detected problem
- Revision: 198891
- Reporter: festr
- Coders: dvossel
-
- #14465: [patch] Incorrect From: header information when
- CALLERPRES=PRES_PROHIB
- Revision: 206938
- Reporter: Nick_Lewis
- Testers: Nick_Lewis, dvossel
- Coders: Nick, dvossel
-
- #14584: [patch] Asterisk does not stop retransmission
- Revision: 202341
- Reporter: klaus3000
- Testers: klaus3000
- Coders: mmichelson
-
- #14725: Asterisk doesn't add Route headers in NOTIFY when the SUBSCRIBE
- came from a proxy
- Revision: 205775
- Reporter: ibc
- Coders: mmichelson
-
- #15158: [patch] Message: "Unable to handle indication 3"
- Revision: 200360
- Reporter: madkins
- Testers: madkins
- Coders: mmichelson
-
- Category: Channels/chan_sip/Registration
-
- #15102: [patch] Registration Deadlock between Asterisk and Polycom
- Soundpoint IP 450
- Revision: 205804
- Reporter: Jamuel
- Testers: Jamuel
- Coders: Jamuel, dvossel
-
- #15194: [patch] [SIP realtime] "sip reload" makes UNREACHABLE users behind
- NAT
- Revision: 197562
- Reporter: ibc
- Testers: manwe
- Coders: eliel
-
- Category: Core/BuildSystem
-
- #15209: make install: build_tools/mkpkgconfig: 21: [[: not found
- Revision: 197264
- Reporter: seandarcy
- Coders: seanbright
-
- Category: Core/General
-
- #13778: asterisk blocked at startup between
- main/asterisk.c/loader.c/load_modules and
- manager.c/loader.c/ast_module_reload
- Revision: 199022
- Reporter: hotsblanc
- Testers: p_lindheimer, seanbright
- Coders: seanbright
-
- Category: Core/Internationalization
-
- #15346: [patch] TW is not an ISO Language Code
- Revision: 204469
- Reporter: volivier
- Testers: volivier
- Coders: tilghman
-
- Category: Core/PBX
-
- #14702: [patch] debugging CID matching
- Revision: 206126
- Reporter: klaus3000
- Coders: klaus3000
-
- #15057: [patch] hints with 2+ devices that include ONHOLD are often set
- wrong
- Revision: 199297
- Reporter: p_lindheimer
- Testers: p_lindheimer, dvossel
- Coders: dvossel, p
-
- #15189: [patch] #exec script can't access manager on first asterisk load
- Revision: 199022
- Reporter: p_lindheimer
- Testers: p_lindheimer, seanbright
- Coders: seanbright
-
- Category: Documentation
-
- #15518: iax.conf, IP-based access control
- Revision: 206872
- Reporter: pkempgen
- Coders: dvossel
-
- Category: Functions/func_cut
-
- #15208: [patch] The CUT function does not show the leading
- field-separators until it finds a value.
- Revision: 197194
- Reporter: ramonpeek
- Coders: tilghman
-
- Category: Functions/func_devstate
-
- #15413: [patch] Mapping of extension state to device state is incorrect
- Revision: 204681
- Reporter: legart
- Testers: dvossel, legart, amilcar
- Coders: dvossel
-
- Category: Functions/func_odbc
-
- #15317: func_odbc is broken in 1.4.25
- Revision: 204170
- Reporter: alexh
- Coders: tilghman
-
- Category: Functions/func_realtime
-
- #15517: [patch] memory leak in func_realtime
- Revision: 206807
- Reporter: adomjan
- Coders: adomjan
-
- Category: General
-
- #15225: make config on slackware
- Revision: 197998
- Reporter: pdavis
- Coders: seanbright
-
- #15420: [patch] No audio on calls from asterisk sip phones to nortel set
- until dtmf from sip phone
- Revision: 205728
- Reporter: scottbmilne
- Testers: scottbmilne, alecdavis
- Coders: alecdavis
-
- Category: PBX/pbx_spool
-
- #15072: [patch] Possible crash in pbx_spool.c - operation on previously
- freed structure
- Revision: 198957
- Reporter: garlew
- Coders: garlew
-
- Category: Resources/res_convert
-
- #15181: [patch] file convert leaks input file descriptor
- Revision: 196826
- Reporter: jkroon
- Coders: russell
-
- Category: Resources/res_features
-
- #13794: [patch] CDR for picked up parked call gives answer time < start
- time and no record for parking
- Revision: 203375
- Reporter: davidw
- Testers: murf, dbrooks
- Coders: murf
-
- #15183: [patch] Attended Transfers are not working
- Revision: 197124
- Reporter: andrebarbosa
- Testers: andrebarbosa, tootai, loloski
- Coders: jpeeler
-
- Category: Resources/res_jabber
-
- #14876: [patch] Missing \r\n in response to JabberSend manager action
- Revision: 198370
- Reporter: srt
- Coders: seanbright, srt, phsultan
-
- Category: Resources/res_musiconhold
-
- #14759: [patch] Asterisk commands "moh reload" or "reload
- res_musiconhold.so" causes MOH not to work properly
- Revision: 198665
- Reporter: lidocaineus
- Testers: lmadsen
- Coders: tilghman
-
- Category: Resources/res_smdi
-
- #14561: When using SMDI Asterisk crashes after message is left
- Revision: 198311
- Reporter: cmoss28
- Coders: russell
-
- Category: Utilities/General
-
- #10812: [patch] safe_asterisk includes bashisms
- Revision: 196657
- Reporter: paravoid
- Coders: tzafrir
-
- ----------------------------------------------------------------------
-
- Commits Not Associated with an Issue
-
- [Back to Top]
-
- This is a list of all changes that went into this release that did not
- directly close an issue from the issue tracker. The commits may have been
- marked as being related to an issue. If that is the case, the issue
- numbers are listed here, as well.
-
- +------------------------------------------------------------------------+
- | Revision | Author | Summary | Issues |
- | | | | Referenced |
- |----------+------------+-----------------------------------+------------|
- | 197259 | oej | Typo fix | |
- |----------+------------+-----------------------------------+------------|
- | | | Allow for media to arrive from an | |
- | 197588 | mmichelson | alternate source when responding | |
- | | | to a reinvite with 491. | |
- |----------+------------+-----------------------------------+------------|
- | | | 'iax show peer blah' now outputs | |
- | 197620 | dvossel | whether or not peer 'blah' is in | |
- | | | trunk mode or not. | |
- |----------+------------+-----------------------------------+------------|
- | 197895 | lmadsen | Update MixMonitor documentation. | #14829 |
- |----------+------------+-----------------------------------+------------|
- | 199138 | dvossel | Additional updates to | |
- | | | AST-2009-001 | |
- |----------+------------+-----------------------------------+------------|
- | 199628 | seanbright | Fix a typo in the stack size | |
- | | | calculation just introduced. | |
- |----------+------------+-----------------------------------+------------|
- | | | __WORDSIZE is not available on | |
- | 199856 | seanbright | all platforms, so use sizeof(void | |
- | | | *) instead. | |
- |----------+------------+-----------------------------------+------------|
- | 200037 | lmadsen | Fix path for .flavor and | #14737 |
- | | | .version. | |
- |----------+------------+-----------------------------------+------------|
- | 200185 | seanbright | Backport fix for parallel build | |
- | | | warnings from trunk r199781. | |
- |----------+------------+-----------------------------------+------------|
- | | | Add INFO to our allowed methods | |
- | 200513 | mmichelson | so that endpoints know they may | |
- | | | send it to us. | |
- |----------+------------+-----------------------------------+------------|
- | 200875 | eliel | Show the interface name on error, | |
- | | | if it is not found. | |
- |----------+------------+-----------------------------------+------------|
- | | | Improve support for media paths | |
- | 200991 | kpfleming | that can generate multiple frames | |
- | | | at once. | |
- |----------+------------+-----------------------------------+------------|
- | | | Correct AST_LIST_APPEND_LIST | |
- | 201261 | kpfleming | behavior when list to be appended | |
- | | | is empty. | |
- |----------+------------+-----------------------------------+------------|
- | | | Change the datastore traversal in | |
- | 201450 | mmichelson | ast_do_masquerade to use a safe | |
- | | | list traversal. | |
- |----------+------------+-----------------------------------+------------|
- | | | Fix memory corruption and leakage | #15109, |
- | 201600 | russell | related reloads of non files mode | #15123, |
- | | | MoH classes. | #15195 |
- |----------+------------+-----------------------------------+------------|
- | 201828 | tilghman | If the "h" extension fails, give | |
- | | | it another chance in main/pbx.c. | |
- |----------+------------+-----------------------------------+------------|
- | | | Added deadlock protection to | |
- | 202022 | mnicholson | try_suggested_sip_codec in | |
- | | | chan_sip.c. | |
- |----------+------------+-----------------------------------+------------|
- | 202342 | mmichelson | Remove an extra debug line left | |
- | | | from previous commit. | |
- |----------+------------+-----------------------------------+------------|
- | 202414 | russell | Make Polycom subscription type | |
- | | | override check more explicit. | |
- |----------+------------+-----------------------------------+------------|
- | 202496 | russell | Report CallerID change during a | |
- | | | masquerade. | |
- |----------+------------+-----------------------------------+------------|
- | | | Fix potential memory leak in | |
- | 202572 | mmichelson | chan_sip when video rtp is not | |
- | | | allocated properly. | |
- |----------+------------+-----------------------------------+------------|
- | | | Fix more memory leaks that may | |
- | 202601 | mmichelson | result if rtp is not successfully | |
- | | | allocated. | |
- |----------+------------+-----------------------------------+------------|
- | | | Use the handy UNLINK macro | |
- | 202966 | mmichelson | instead of hand-coding the same | |
- | | | thing in-line. | |
- |----------+------------+-----------------------------------+------------|
- | 203036 | rmudgett | Improved chan_dahdi.conf pritimer | |
- | | | error checking. | |
- |----------+------------+-----------------------------------+------------|
- | 203115 | russell | Resolve a crash related to a T.38 | |
- | | | reinvite race condition. | |
- |----------+------------+-----------------------------------+------------|
- | | | Prevent false positives when | |
- | 203230 | mmichelson | freeing a NULL pointer with | |
- | | | MALLOC_DEBUG enabled. | |
- |----------+------------+-----------------------------------+------------|
- | 203311 | twilson | Don't try to free NULL | |
- |----------+------------+-----------------------------------+------------|
- | 203380 | twilson | I didn't see that Mark already | |
- | | | fixed the underlying issue! | |
- |----------+------------+-----------------------------------+------------|
- | 204246 | mmichelson | Fix build oops. | |
- |----------+------------+-----------------------------------+------------|
- | | | Fix ast_say_counted_noun to | |
- | 204474 | qwell | correctly handle Polish. Fix a | |
- | | | comment typo in passing. | |
- |----------+------------+-----------------------------------+------------|
- | | | moving device state functions | |
- | 204755 | dvossel | from pbx.h to devicestate.h to | |
- | | | sync with other branches | |
- |----------+------------+-----------------------------------+------------|
- | 205149 | russell | Make OpenSSL usage thread-safe. | |
- |----------+------------+-----------------------------------+------------|
- | | | Add redirection warnings for the | |
- | 205188 | tilghman | invalid language codes previously | |
- | | | removed. | |
- |----------+------------+-----------------------------------+------------|
- | 205215 | dvossel | ast_samp2tv needs floating point | |
- | | | for 16khz audio | |
- |----------+------------+-----------------------------------+------------|
- | | | Update config.guess and | |
- | 205288 | qwell | config.sub from the | |
- | | | savannah.gnu.org git repo. | |
- |----------+------------+-----------------------------------+------------|
- | 205409 | dvossel | moving ast_devstate_to_extenstate | |
- | | | to pbx.c from devicestate.c | |
- |----------+------------+-----------------------------------+------------|
- | 205471 | dvossel | Fixes 8khz assumptions | |
- |----------+------------+-----------------------------------+------------|
- | 205599 | dvossel | Changing ast_samp2tv to not use | |
- | | | floating point. | |
- |----------+------------+-----------------------------------+------------|
- | 205877 | mmichelson | Properly ACK 487 responses to | |
- | | | canceled INVITEs. | |
- |----------+------------+-----------------------------------+------------|
- | 206284 | rmudgett | Fix some memory leaks in | |
- | | | chan_misdn. | |
- |----------+------------+-----------------------------------+------------|
- | 206385 | russell | Ensure apathetic replies are sent | |
- | | | out on the proper socket. | |
- |----------+------------+-----------------------------------+------------|
- | | | Only print debug info in | |
- | 206635 | seanbright | codec_dahdi if we are asking for | |
- | | | it. | |
- |----------+------------+-----------------------------------+------------|
- | 206706 | rmudgett | Merged revision 206700 from | |
- |----------+------------+-----------------------------------+------------|
- | 206867 | dvossel | avoid segfault caused by user | |
- | | | error | |
- |----------+------------+-----------------------------------+------------|
- | 207033 | dvossel | sip option flags handled | #15376 |
- | | | incorrectly | |
- +------------------------------------------------------------------------+
-
- ----------------------------------------------------------------------
-
- Diffstat Results
-
- [Back to Top]
-
- This is a summary of the changes to the source code that went into this
- release that was generated using the diffstat utility.
-
- Makefile | 14
- UPGRADE.txt | 10
- apps/app_chanspy.c | 20
- apps/app_dial.c | 3
- apps/app_meetme.c | 16
- apps/app_mixmonitor.c | 98 +++-
- apps/app_queue.c | 9
- apps/app_voicemail.c | 2
- build_tools/cflags-devmode.xml | 2
- build_tools/make_version_h | 6
- channels/chan_dahdi.c | 99 +++-
- channels/chan_iax2.c | 63 ++-
- channels/chan_misdn.c | 785 +++++++++++++++++++++++----------------
- channels/chan_sip.c | 362 +++++++++++++----
- channels/misdn/isdn_lib.c | 155 ++++---
- channels/misdn/isdn_lib.h | 3
- channels/misdn/isdn_lib_intern.h | 1
- codecs/codec_dahdi.c | 12
- config.guess | 168 +++++---
- config.sub | 160 ++++++-
- configs/chan_dahdi.conf.sample | 5
- configs/iax.conf.sample | 2
- contrib/scripts/safe_asterisk | 8
- doc/asterisk-conf.txt | 4
- funcs/func_cut.c | 11
- funcs/func_odbc.c | 11
- funcs/func_realtime.c | 2
- funcs/func_strings.c | 26 -
- include/asterisk.h | 12
- include/asterisk/audiohook.h | 4
- include/asterisk/cdr.h | 19
- include/asterisk/channel.h | 36 +
- include/asterisk/devicestate.h | 81 +++-
- include/asterisk/frame.h | 11
- include/asterisk/linkedlists.h | 39 +
- include/asterisk/pbx.h | 9
- include/asterisk/rtp.h | 17
- include/asterisk/time.h | 2
- include/asterisk/utils.h | 6
- main/asterisk.c | 17
- main/astmm.c | 8
- main/audiohook.c | 12
- main/autoservice.c | 17
- main/callerid.c | 4
- main/cdr.c | 36 +
- main/channel.c | 394 ++++++++++++++-----
- main/cli.c | 1
- main/devicestate.c | 108 ++++-
- main/file.c | 25 -
- main/frame.c | 125 ++----
- main/loader.c | 81 ++++
- main/pbx.c | 138 +++---
- main/rtp.c | 71 ++-
- main/say.c | 505 ++++++++++++++-----------
- main/slinfactory.c | 30 -
- pbx/pbx_spool.c | 6
- res/res_convert.c | 4
- res/res_crypto.c | 46 ++
- res/res_features.c | 45 +-
- res/res_jabber.c | 16
- res/res_musiconhold.c | 20
- res/res_smdi.c | 4
- 62 files changed, 2676 insertions(+), 1330 deletions(-)
-
- ----------------------------------------------------------------------
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 1a69f6df8..c2b5b88da 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -1444,9 +1444,9 @@ static struct ast_channel *agent_request(const char *type, int format, void *dat
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
@@ -2672,9 +2672,9 @@ static int agent_devicestate(void *data)
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)) {
+ else if ((s[0] == ':') && (sscanf(s + 1, "%30d", &groupoff) == 1)) {
groupmatch = (1 << groupoff);
waitforagent = 1;
} else
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 70830e024..75f43deeb 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -8310,7 +8310,7 @@ static struct ast_channel *dahdi_request(const char *type, int format, void *dat
stringp = dest + 1;
s = strsep(&stringp, "/");
- if ((res = sscanf(s, "%d%c%d", &x, &opt, &y)) < 1) {
+ if ((res = sscanf(s, "%30d%1c%30d", &x, &opt, &y)) < 1) {
ast_log(LOG_WARNING, "Unable to determine group for data %s\n", (char *)data);
return NULL;
}
@@ -8346,7 +8346,7 @@ static struct ast_channel *dahdi_request(const char *type, int format, void *dat
channelmatch = x;
}
#ifdef HAVE_PRI
- else if ((res = sscanf(s, "%d:%d%c%d", &trunkgroup, &crv, &opt, &y)) > 1) {
+ else if ((res = sscanf(s, "%30d:%30d%c%30d", &trunkgroup, &crv, &opt, &y)) > 1) {
if ((trunkgroup < 1) || (crv < 1)) {
ast_log(LOG_WARNING, "Unable to determine trunk group and CRV for data %s\n", (char *)data);
return NULL;
@@ -8369,7 +8369,7 @@ static struct ast_channel *dahdi_request(const char *type, int format, void *dat
p = pris[x].crvs;
}
#endif
- else if ((res = sscanf(s, "%d%c%d", &x, &opt, &y)) < 1) {
+ else if ((res = sscanf(s, "%30d%1c%30d", &x, &opt, &y)) < 1) {
ast_log(LOG_WARNING, "Unable to determine channel for data %s\n", (char *)data);
return NULL;
} else {
@@ -10604,7 +10604,7 @@ static int dahdi_show_channel(int fd, int argc, char **argv)
return RESULT_SHOWUSAGE;
#ifdef HAVE_PRI
if ((c = strchr(argv[3], ':'))) {
- if (sscanf(argv[3], "%d:%d", &trunkgroup, &channel) != 2)
+ if (sscanf(argv[3], "%30d:%30d", &trunkgroup, &channel) != 2)
return RESULT_SHOWUSAGE;
if ((trunkgroup < 1) || (channel < 1))
return RESULT_SHOWUSAGE;
@@ -11231,7 +11231,7 @@ static int build_channels(struct dahdi_chan_conf *conf, int iscrv, const char *v
#ifdef HAVE_PRI
pri = NULL;
if (iscrv) {
- if (sscanf(c, "%d:%n", &trunkgroup, &y) != 1) {
+ if (sscanf(c, "%30d:%n", &trunkgroup, &y) != 1) {
ast_log(LOG_WARNING, "CRV must begin with trunkgroup followed by a colon at line %d\n", lineno);
return -1;
}
@@ -11254,9 +11254,9 @@ static int build_channels(struct dahdi_chan_conf *conf, int iscrv, const char *v
#endif
while ((chan = strsep(&c, ","))) {
- if (sscanf(chan, "%d-%d", &start, &finish) == 2) {
+ if (sscanf(chan, "%30d-%30d", &start, &finish) == 2) {
/* Range */
- } else if (sscanf(chan, "%d", &start)) {
+ } else if (sscanf(chan, "%30d", &start)) {
/* Just one */
finish = start;
} else if (!strcasecmp(chan, "pseudo")) {
@@ -11331,7 +11331,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
int res;
char policy[21] = "";
- res = sscanf(v->value, "%d,%20s", &confp->chan.buf_no, policy);
+ res = sscanf(v->value, "%30d,%20s", &confp->chan.buf_no, policy);
if (res != 2) {
ast_log(LOG_WARNING, "Parsing buffers option data failed, using defaults.\n");
confp->chan.buf_no = numbufs;
@@ -11364,11 +11364,11 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} else if (!strcasecmp(v->name, "dring3context")) {
ast_copy_string(drings.ringContext[2].contextData, v->value, sizeof(drings.ringContext[2].contextData));
} else if (!strcasecmp(v->name, "dring1")) {
- sscanf(v->value, "%d,%d,%d", &drings.ringnum[0].ring[0], &drings.ringnum[0].ring[1], &drings.ringnum[0].ring[2]);
+ sscanf(v->value, "%30d,%30d,%30d", &drings.ringnum[0].ring[0], &drings.ringnum[0].ring[1], &drings.ringnum[0].ring[2]);
} else if (!strcasecmp(v->name, "dring2")) {
- sscanf(v->value, "%d,%d,%d", &drings.ringnum[1].ring[0], &drings.ringnum[1].ring[1], &drings.ringnum[1].ring[2]);
+ sscanf(v->value, "%30d,%30d,%30d", &drings.ringnum[1].ring[0], &drings.ringnum[1].ring[1], &drings.ringnum[1].ring[2]);
} else if (!strcasecmp(v->name, "dring3")) {
- sscanf(v->value, "%d,%d,%d", &drings.ringnum[2].ring[0], &drings.ringnum[2].ring[1], &drings.ringnum[2].ring[2]);
+ sscanf(v->value, "%30d,%30d,%30d", &drings.ringnum[2].ring[0], &drings.ringnum[2].ring[1], &drings.ringnum[2].ring[2]);
} else if (!strcasecmp(v->name, "usecallerid")) {
confp->chan.use_callerid = ast_true(v->value);
} else if (!strcasecmp(v->name, "cidsignalling")) {
@@ -11423,7 +11423,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} else if (!strcasecmp(v->name, "busycount")) {
confp->chan.busycount = atoi(v->value);
} else if (!strcasecmp(v->name, "busypattern")) {
- if (sscanf(v->value, "%d,%d", &confp->chan.busy_tonelength, &confp->chan.busy_quietlength) != 2) {
+ if (sscanf(v->value, "%30d,%30d", &confp->chan.busy_tonelength, &confp->chan.busy_quietlength) != 2) {
ast_log(LOG_ERROR, "busypattern= expects busypattern=tonelength,quietlength\n");
}
} else if (!strcasecmp(v->name, "callprogress")) {
@@ -11455,7 +11455,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
confp->chan.echocancel=128;
}
} else if (!strcasecmp(v->name, "echotraining")) {
- if (sscanf(v->value, "%d", &y) == 1) {
+ if (sscanf(v->value, "%30d", &y) == 1) {
if ((y < 10) || (y > 4000)) {
ast_log(LOG_WARNING, "Echo training time must be within the range of 10 to 4000 ms at line %d\n", v->lineno);
} else {
@@ -11503,15 +11503,15 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} else if (!strcasecmp(v->name, "transfertobusy")) {
confp->chan.transfertobusy = ast_true(v->value);
} else if (!strcasecmp(v->name, "rxgain")) {
- if (sscanf(v->value, "%f", &confp->chan.rxgain) != 1) {
+ if (sscanf(v->value, "%30f", &confp->chan.rxgain) != 1) {
ast_log(LOG_WARNING, "Invalid rxgain: %s\n", v->value);
}
} else if (!strcasecmp(v->name, "txgain")) {
- if (sscanf(v->value, "%f", &confp->chan.txgain) != 1) {
+ if (sscanf(v->value, "%30f", &confp->chan.txgain) != 1) {
ast_log(LOG_WARNING, "Invalid txgain: %s\n", v->value);
}
} else if (!strcasecmp(v->name, "tonezone")) {
- if (sscanf(v->value, "%d", &confp->chan.tonezone) != 1) {
+ if (sscanf(v->value, "%30d", &confp->chan.tonezone) != 1) {
ast_log(LOG_WARNING, "Invalid tonezone: %s\n", v->value);
}
} else if (!strcasecmp(v->name, "callerid")) {
@@ -11865,7 +11865,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
ast_copy_string(original_args, v->value, sizeof(original_args));
/* 16 cadences allowed (8 pairs) */
- element_count = sscanf(v->value, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4], &c[5], &c[6], &c[7], &c[8], &c[9], &c[10], &c[11], &c[12], &c[13], &c[14], &c[15]);
+ element_count = sscanf(v->value, "%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d,%30d", &c[0], &c[1], &c[2], &c[3], &c[4], &c[5], &c[6], &c[7], &c[8], &c[9], &c[10], &c[11], &c[12], &c[13], &c[14], &c[15]);
/* Cadence must be even (on/off) */
if (element_count % 2 == 1) {
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 40935acbc..700fdd174 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -2890,7 +2890,7 @@ static int reload_config(int is_reload)
memcpy(&bindaddr.sin_addr, hp->h_addr, sizeof(bindaddr.sin_addr));
}
} else if (!strcasecmp(v->name, "tos")) {
- if (sscanf(v->value, "%d", &format)) {
+ if (sscanf(v->value, "%30d", &format)) {
tos = format & 0xff;
} else if (!strcasecmp(v->value, "lowdelay")) {
tos = IPTOS_LOWDELAY;
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index a38e19d59..b06ec709a 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -9835,18 +9835,18 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
peer->maxms = 0;
} else if (!strcasecmp(v->value, "yes")) {
peer->maxms = DEFAULT_MAXMS;
- } else if (sscanf(v->value, "%d", &peer->maxms) != 1) {
+ } else if (sscanf(v->value, "%30d", &peer->maxms) != 1) {
ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of iax.conf\n", peer->name, v->lineno);
peer->maxms = 0;
}
} else if (!strcasecmp(v->name, "qualifysmoothing")) {
peer->smoothing = ast_true(v->value);
} else if (!strcasecmp(v->name, "qualifyfreqok")) {
- if (sscanf(v->value, "%d", &peer->pokefreqok) != 1) {
+ if (sscanf(v->value, "%30d", &peer->pokefreqok) != 1) {
ast_log(LOG_WARNING, "Qualification testing frequency of peer '%s' when OK should a number of milliseconds at line %d of iax.conf\n", peer->name, v->lineno);
}
} else if (!strcasecmp(v->name, "qualifyfreqnotok")) {
- if (sscanf(v->value, "%d", &peer->pokefreqnotok) != 1) {
+ if (sscanf(v->value, "%30d", &peer->pokefreqnotok) != 1) {
ast_log(LOG_WARNING, "Qualification testing frequency of peer '%s' when NOT OK should be a number of milliseconds at line %d of iax.conf\n", peer->name, v->lineno);
} else ast_log(LOG_WARNING, "Set peer->pokefreqnotok to %d\n", peer->pokefreqnotok);
} else if (!strcasecmp(v->name, "timezone")) {
@@ -10390,7 +10390,7 @@ static int set_config(char *config_file, int reload)
if (trunkfreq < 10)
trunkfreq = 10;
} else if (!strcasecmp(v->name, "autokill")) {
- if (sscanf(v->value, "%d", &x) == 1) {
+ if (sscanf(v->value, "%30d", &x) == 1) {
if (x >= 0)
autokill = x;
else
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 1d5114bee..159657b85 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1863,7 +1863,7 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req)
ast_log(LOG_WARNING, "Unable to lookup host in c= line, '%s'\n", c);
return -1;
}
- if (sscanf(m, "audio %d RTP/AVP %n", &portno, &len) != 1) {
+ if (sscanf(m, "audio %30d RTP/AVP %n", &portno, &len) != 1) {
ast_log(LOG_WARNING, "Unable to determine port number for RTP in '%s'\n", m);
return -1;
}
@@ -1878,7 +1878,7 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req)
ast_rtp_pt_clear(sub->rtp);
codecs = ast_strdupa(m + len);
while (!ast_strlen_zero(codecs)) {
- if (sscanf(codecs, "%d%n", &codec, &len) != 1) {
+ if (sscanf(codecs, "%30d%n", &codec, &len) != 1) {
if (codec_count)
break;
ast_log(LOG_WARNING, "Error in codec string '%s' at '%s'\n", m, codecs);
@@ -1894,7 +1894,7 @@ static int process_sdp(struct mgcp_subchannel *sub, struct mgcp_request *req)
sdpLineNum_iterator_init(&iterator);
while ((a = get_sdp_iterate(&iterator, req, "a"))[0] != '\0') {
char* mimeSubtype = ast_strdupa(a); /* ensures we have enough space */
- if (sscanf(a, "rtpmap: %u %[^/]/", &codec, mimeSubtype) != 2)
+ if (sscanf(a, "rtpmap: %30u %[^/]/", &codec, mimeSubtype) != 2)
continue;
/* Note: should really look at the 'freq' and '#chans' params too */
ast_rtp_set_rtpmap_type(sub->rtp, codec, "audio", mimeSubtype, 0);
@@ -2028,7 +2028,7 @@ static int transmit_response(struct mgcp_subchannel *sub, char *msg, struct mgcp
if (mgr) {
/* Store MGCP response in case we have to retransmit */
memset(mgr, 0, sizeof(struct mgcp_response));
- sscanf(req->identifier, "%d", &mgr->seqno);
+ sscanf(req->identifier, "%30d", &mgr->seqno);
time(&mgr->whensent);
mgr->len = resp.len;
memcpy(mgr->buf, resp.data, resp.len);
@@ -3320,7 +3320,7 @@ static int find_and_retrans(struct mgcp_subchannel *sub, struct mgcp_request *re
time_t now;
struct mgcp_response *prev = NULL, *cur, *next, *answer=NULL;
time(&now);
- if (sscanf(req->identifier, "%d", &seqno) != 1)
+ if (sscanf(req->identifier, "%30d", &seqno) != 1)
seqno = 0;
cur = sub->parent->parent->responses;
while(cur) {
@@ -3378,7 +3378,7 @@ static int mgcpsock_read(int *id, int fd, short events, void *ignore)
return 1;
}
- if (sscanf(req.verb, "%d", &result) && sscanf(req.identifier, "%d", &ident)) {
+ if (sscanf(req.verb, "%30d", &result) && sscanf(req.identifier, "%30d", &ident)) {
/* Try to find who this message is for, if it's important */
sub = find_subchannel_and_lock(NULL, ident, &sin);
if (sub) {
@@ -4170,7 +4170,7 @@ static int reload_config(void)
else
capability &= ~format;
} else if (!strcasecmp(v->name, "tos")) {
- if (sscanf(v->value, "%d", &format) == 1)
+ if (sscanf(v->value, "%30d", &format) == 1)
tos = format & 0xff;
else if (!strcasecmp(v->value, "lowdelay"))
tos = IPTOS_LOWDELAY;
@@ -4185,7 +4185,7 @@ static int reload_config(void)
else
ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno);
} else if (!strcasecmp(v->name, "port")) {
- if (sscanf(v->value, "%d", &ourport) == 1) {
+ if (sscanf(v->value, "%30d", &ourport) == 1) {
bindaddr.sin_port = htons(ourport);
} else {
ast_log(LOG_WARNING, "Invalid port number '%s' at line %d of %s\n", v->value, v->lineno, config);
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 24d043a46..6e273d30d 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -1130,7 +1130,7 @@ static int misdn_show_config (int fd, int argc, char *argv[])
}
return ok ? 0 : RESULT_SHOWUSAGE;
}
- if (!sscanf(argv[3], "%d", &onlyport) || onlyport < 0) {
+ if (!sscanf(argv[3], "%30d", &onlyport) || onlyport < 0) {
ast_cli(fd, "Unknown option: %s\n", argv[3]);
return RESULT_SHOWUSAGE;
}
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 73297f4ef..df0803935 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -1577,7 +1577,7 @@ static char active_usage[] =
static void store_boost(struct chan_oss_pvt *o, char *s)
{
double boost = 0;
- if (sscanf(s, "%lf", &boost) != 1) {
+ if (sscanf(s, "%30lf", &boost) != 1) {
ast_log(LOG_WARNING, "invalid boost <%s>\n", s);
return;
}
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 55bda8b72..fd202844b 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -1243,7 +1243,7 @@ static int parse_gain_value(char *gain_type, char *value)
float gain;
/* try to scan number */
- if (sscanf(value, "%f", &gain) != 1)
+ if (sscanf(value, "%30f", &gain) != 1)
{
ast_log(LOG_ERROR, "Invalid %s value '%s' in '%s' config\n",
value, gain_type, config);
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0c403ea2c..98be29093 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2066,7 +2066,7 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int res
if (resp) {
ast_set_flag(pkt, FLAG_RESPONSE);
/* Parse out the response code */
- if (sscanf(pkt->data, "SIP/2.0 %d", &respid) == 1) {
+ if (sscanf(pkt->data, "SIP/2.0 %30d", &respid) == 1) {
pkt->response_code = respid;
}
}
@@ -2124,7 +2124,7 @@ static int __sip_autodestruct(const void *data)
if (option_debug > 2)
ast_log(LOG_DEBUG, "Re-scheduled destruction of SIP call %s\n", p->callid ? p->callid : "<unknown>");
append_history(p, "ReliableXmit", "timeout");
- if (sscanf(p->lastmsg, "Tx: %s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %s", method_str) == 1) {
+ if (sscanf(p->lastmsg, "Tx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %30s", method_str) == 1) {
if (method_match(SIP_CANCEL, method_str) || method_match(SIP_BYE, method_str)) {
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
}
@@ -2974,7 +2974,7 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer, struct sockadd
if (sin) {
memcpy(&dialog->sa.sin_addr, &sin->sin_addr, sizeof(dialog->sa.sin_addr));
if (!sin->sin_port) {
- if (ast_strlen_zero(port) || sscanf(port, "%u", &portno) != 1) {
+ if (ast_strlen_zero(port) || sscanf(port, "%30u", &portno) != 1) {
portno = STANDARD_SIP_PORT;
}
} else {
@@ -5040,7 +5040,7 @@ static int find_sdp(struct sip_request *req)
content_length = get_header(req, "Content-Length");
if (!ast_strlen_zero(content_length)) {
- if (sscanf(content_length, "%ud", &x) != 1) {
+ if (sscanf(content_length, "%30u", &x) != 1) {
ast_log(LOG_WARNING, "Invalid Content-Length: %s\n", content_length);
return 0;
}
@@ -5169,10 +5169,10 @@ static int get_ip_and_port_from_sdp(struct sip_request *req, const enum media_ty
}
/* We only want the m and c lines for audio */
for (m = get_sdp_iterate(&miterator, req, "m"); !ast_strlen_zero(m); m = get_sdp_iterate(&miterator, req, "m")) {
- if ((media == SDP_AUDIO && ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
- (sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1 && len > 0))) ||
- (media == SDP_VIDEO && ((sscanf(m, "video %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
- (sscanf(m, "video %d RTP/AVP %n", &x, &len) == 1 && len > 0)))) {
+ if ((media == SDP_AUDIO && ((sscanf(m, "audio %30d/%30d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
+ (sscanf(m, "audio %30d RTP/AVP %n", &x, &len) == 1 && len > 0))) ||
+ (media == SDP_VIDEO && ((sscanf(m, "video %30d/%30d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
+ (sscanf(m, "video %30d RTP/AVP %n", &x, &len) == 1 && len > 0)))) {
/* See if there's a c= line for this media stream.
* XXX There is no guarantee that we'll be grabbing the c= line for this
* particular media stream here. However, this is the same logic used in process_sdp.
@@ -5308,15 +5308,15 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
numberofports = 1;
len = -1;
- if ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
- (sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1 && len > 0)) {
+ if ((sscanf(m, "audio %30d/%30d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
+ (sscanf(m, "audio %30d RTP/AVP %n", &x, &len) == 1 && len > 0)) {
audio = TRUE;
numberofmediastreams++;
/* Found audio stream in this media definition */
portno = x;
/* Scan through the RTP payload types specified in a "m=" line: */
for (codecs = m + len; !ast_strlen_zero(codecs); codecs = ast_skip_blanks(codecs + len)) {
- if (sscanf(codecs, "%d%n", &codec, &len) != 1) {
+ if (sscanf(codecs, "%30d%n", &codec, &len) != 1) {
ast_log(LOG_WARNING, "Error in codec string '%s'\n", codecs);
return -1;
}
@@ -5324,15 +5324,15 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
ast_verbose("Found RTP audio format %d\n", codec);
ast_rtp_set_m_type(newaudiortp, codec);
}
- } else if ((sscanf(m, "video %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
- (sscanf(m, "video %d RTP/AVP %n", &x, &len) == 1 && len >= 0)) {
+ } else if ((sscanf(m, "video %30d/%30d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
+ (sscanf(m, "video %30d RTP/AVP %n", &x, &len) == 1 && len >= 0)) {
/* If it is not audio - is it video ? */
ast_clear_flag(&p->flags[0], SIP_NOVIDEO);
numberofmediastreams++;
vportno = x;
/* Scan through the RTP payload types specified in a "m=" line: */
for (codecs = m + len; !ast_strlen_zero(codecs); codecs = ast_skip_blanks(codecs + len)) {
- if (sscanf(codecs, "%d%n", &codec, &len) != 1) {
+ if (sscanf(codecs, "%30d%n", &codec, &len) != 1) {
ast_log(LOG_WARNING, "Error in codec string '%s'\n", codecs);
return -1;
}
@@ -5340,8 +5340,8 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
ast_verbose("Found RTP video format %d\n", codec);
ast_rtp_set_m_type(newvideortp, codec);
}
- } else if (p->udptl && ( (sscanf(m, "image %d udptl t38%n", &x, &len) == 1 && len > 0) ||
- (sscanf(m, "image %d UDPTL t38%n", &x, &len) == 1 && len >= 0) )) {
+ } else if (p->udptl && ( (sscanf(m, "image %30d udptl t38%n", &x, &len) == 1 && len > 0) ||
+ (sscanf(m, "image %30d UDPTL t38%n", &x, &len) == 1 && len >= 0) )) {
if (debug)
ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
udptlportno = x;
@@ -5526,7 +5526,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
ast_rtp_codec_setpref(p->rtp, pref);
}
continue;
- } else if (sscanf(a, "rtpmap: %u %[^/]/", &codec, mimeSubtype) == 2) {
+ } else if (sscanf(a, "rtpmap: %30u %[^/]/", &codec, mimeSubtype) == 2) {
/* We have a rtpmap to handle */
int found = FALSE;
/* We should propably check if this is an audio or video codec
@@ -5576,11 +5576,11 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
/* Scan trough the a= lines for T38 attributes and set apropriate fileds */
iterator = req->sdp_start;
while ((a = get_sdp_iterate(&iterator, req, "a"))[0] != '\0') {
- if ((sscanf(a, "T38FaxMaxBuffer:%d", &x) == 1)) {
+ if ((sscanf(a, "T38FaxMaxBuffer:%30d", &x) == 1)) {
found = 1;
if (option_debug > 2)
ast_log(LOG_DEBUG, "MaxBufferSize:%d\n",x);
- } else if ((sscanf(a, "T38MaxBitRate:%d", &x) == 1) || (sscanf(a, "T38FaxMaxRate:%d", &x) == 1)) {
+ } else if ((sscanf(a, "T38MaxBitRate:%30d", &x) == 1) || (sscanf(a, "T38FaxMaxRate:%30d", &x) == 1)) {
found = 1;
if (option_debug > 2)
ast_log(LOG_DEBUG,"T38MaxBitRate: %d\n",x);
@@ -5604,7 +5604,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
peert38capability |= T38FAX_RATE_2400;
break;
}
- } else if ((sscanf(a, "T38FaxVersion:%d", &x) == 1)) {
+ } else if ((sscanf(a, "T38FaxVersion:%30d", &x) == 1)) {
found = 1;
if (option_debug > 2)
ast_log(LOG_DEBUG, "FaxVersion: %d\n",x);
@@ -5612,7 +5612,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
peert38capability |= T38FAX_VERSION_0;
else if (x == 1)
peert38capability |= T38FAX_VERSION_1;
- } else if ((sscanf(a, "T38FaxMaxDatagram:%d", &x) == 1) || (sscanf(a, "T38MaxDatagram:%d", &x) == 1)) {
+ } else if ((sscanf(a, "T38FaxMaxDatagram:%30d", &x) == 1) || (sscanf(a, "T38MaxDatagram:%30d", &x) == 1)) {
found = 1;
if (option_debug > 2)
ast_log(LOG_DEBUG, "FaxMaxDatagram: %d\n",x);
@@ -5620,7 +5620,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
ast_udptl_set_local_max_datagram(p->udptl, x);
} else if ((strncmp(a, "T38FaxFillBitRemoval", 20) == 0)) {
found = 1;
- if ((sscanf(a, "T38FaxFillBitRemoval:%d", &x) == 1)) {
+ if ((sscanf(a, "T38FaxFillBitRemoval:%30d", &x) == 1)) {
if (option_debug > 2)
ast_log(LOG_DEBUG, "FillBitRemoval: %d\n",x);
if (x == 1)
@@ -5632,7 +5632,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
}
} else if ((strncmp(a, "T38FaxTranscodingMMR", 20) == 0)) {
found = 1;
- if ((sscanf(a, "T38FaxTranscodingMMR:%d", &x) == 1)) {
+ if ((sscanf(a, "T38FaxTranscodingMMR:%30d", &x) == 1)) {
if (option_debug > 2)
ast_log(LOG_DEBUG, "Transcoding MMR: %d\n",x);
if (x == 1)
@@ -5644,7 +5644,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
}
} else if ((strncmp(a, "T38FaxTranscodingJBIG", 21) == 0)) {
found = 1;
- if ((sscanf(a, "T38FaxTranscodingJBIG:%d", &x) == 1)) {
+ if ((sscanf(a, "T38FaxTranscodingJBIG:%30d", &x) == 1)) {
if (option_debug > 2)
ast_log(LOG_DEBUG, "Transcoding JBIG: %d\n",x);
if (x == 1)
@@ -6326,7 +6326,7 @@ static int __transmit_response(struct sip_pvt *p, const char *msg, const struct
struct sip_request resp;
int seqno = 0;
- if (reliable && (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1)) {
+ if (reliable && (sscanf(get_header(req, "CSeq"), "%30d ", &seqno) != 1)) {
ast_log(LOG_WARNING, "Unable to determine sequence number from '%s'\n", get_header(req, "CSeq"));
return -1;
}
@@ -6468,7 +6468,7 @@ static int transmit_response_with_auth(struct sip_pvt *p, const char *msg, const
char tmp[512];
int seqno = 0;
- if (reliable && (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1)) {
+ if (reliable && (sscanf(get_header(req, "CSeq"), "%30d ", &seqno) != 1)) {
ast_log(LOG_WARNING, "Unable to determine sequence number from '%s'\n", get_header(req, "CSeq"));
return -1;
}
@@ -6953,7 +6953,7 @@ static int transmit_response_with_t38_sdp(struct sip_pvt *p, char *msg, struct s
struct sip_request resp;
int seqno;
- if (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1) {
+ if (sscanf(get_header(req, "CSeq"), "%30d ", &seqno) != 1) {
ast_log(LOG_WARNING, "Unable to get seqno from '%s'\n", get_header(req, "CSeq"));
return -1;
}
@@ -6991,7 +6991,7 @@ static int transmit_response_with_sdp(struct sip_pvt *p, const char *msg, const
{
struct sip_request resp;
int seqno;
- if (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1) {
+ if (sscanf(get_header(req, "CSeq"), "%30d ", &seqno) != 1) {
ast_log(LOG_WARNING, "Unable to get seqno from '%s'\n", get_header(req, "CSeq"));
return -1;
}
@@ -8422,7 +8422,7 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st
if (expires) {
/* XXX bug here, we overwrite the string */
expires = strsep((char **) &expires, ";"); /* trim ; and beyond */
- if (sscanf(expires + 9, "%d", &expiry) != 1)
+ if (sscanf(expires + 9, "%30d", &expiry) != 1)
expiry = default_expiry;
} else {
/* Nothing has been specified */
@@ -12236,7 +12236,7 @@ static int func_header_read(struct ast_channel *chan, char *function, char *data
if (!args.number) {
number = 1;
} else {
- sscanf(args.number, "%d", &number);
+ sscanf(args.number, "%30d", &number);
if (number < 1)
number = 1;
}
@@ -13045,7 +13045,7 @@ static int handle_response_register(struct sip_pvt *p, int resp, char *rest, str
}
tmptmp = strcasestr(contact, "expires=");
if (tmptmp) {
- if (sscanf(tmptmp + 8, "%d;", &expires) != 1)
+ if (sscanf(tmptmp + 8, "%30d;", &expires) != 1)
expires = 0;
}
@@ -16118,7 +16118,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
ast_log(LOG_ERROR, "Missing Cseq. Dropping this SIP message, it's incomplete.\n");
error = 1;
}
- if (!error && sscanf(cseq, "%d%n", &seqno, &len) != 1) {
+ if (!error && sscanf(cseq, "%30d%n", &seqno, &len) != 1) {
ast_log(LOG_ERROR, "No seqno in '%s'. Dropping incomplete message.\n", cmd);
error = 1;
}
@@ -16143,7 +16143,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
if (ast_strlen_zero(e)) {
return 0;
}
- if (sscanf(e, "%d %n", &respid, &len) != 1) {
+ if (sscanf(e, "%30d %n", &respid, &len) != 1) {
ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
return 0;
}
@@ -17659,7 +17659,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
if (realtime && !strcasecmp(v->name, "regseconds")) {
ast_get_time_t(v->value, &regseconds, 0, NULL);
} else if (realtime && !strcasecmp(v->name, "lastms")) {
- sscanf(v->value, "%d", &peer->lastms);
+ sscanf(v->value, "%30d", &peer->lastms);
} else if (realtime && !strcasecmp(v->name, "ipaddr") && !ast_strlen_zero(v->value) ) {
inet_aton(v->value, &(peer->addr.sin_addr));
} else if (realtime && !strcasecmp(v->name, "name"))
@@ -17814,17 +17814,17 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
} else if (!strcasecmp(v->name, "autoframing")) {
peer->autoframing = ast_true(v->value);
} else if (!strcasecmp(v->name, "rtptimeout")) {
- if ((sscanf(v->value, "%d", &peer->rtptimeout) != 1) || (peer->rtptimeout < 0)) {
+ if ((sscanf(v->value, "%30d", &peer->rtptimeout) != 1) || (peer->rtptimeout < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
peer->rtptimeout = global_rtptimeout;
}
} else if (!strcasecmp(v->name, "rtpholdtimeout")) {
- if ((sscanf(v->value, "%d", &peer->rtpholdtimeout) != 1) || (peer->rtpholdtimeout < 0)) {
+ if ((sscanf(v->value, "%30d", &peer->rtpholdtimeout) != 1) || (peer->rtpholdtimeout < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
peer->rtpholdtimeout = global_rtpholdtimeout;
}
} else if (!strcasecmp(v->name, "rtpkeepalive")) {
- if ((sscanf(v->value, "%d", &peer->rtpkeepalive) != 1) || (peer->rtpkeepalive < 0)) {
+ if ((sscanf(v->value, "%30d", &peer->rtpkeepalive) != 1) || (peer->rtpkeepalive < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d. Using default.\n", v->value, v->lineno);
peer->rtpkeepalive = global_rtpkeepalive;
}
@@ -17843,7 +17843,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
peer->maxms = 0;
} else if (!strcasecmp(v->value, "yes")) {
peer->maxms = default_qualify ? default_qualify : DEFAULT_MAXMS;
- } else if (sscanf(v->value, "%d", &peer->maxms) != 1) {
+ } else if (sscanf(v->value, "%30d", &peer->maxms) != 1) {
ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno);
peer->maxms = 0;
}
@@ -18111,24 +18111,24 @@ static int reload_config(enum channelreloadreason reason)
} else if (!strcasecmp(v->name, "relaxdtmf")) {
global_relaxdtmf = ast_true(v->value);
} else if (!strcasecmp(v->name, "checkmwi")) {
- if ((sscanf(v->value, "%d", &global_mwitime) != 1) || (global_mwitime < 0)) {
+ if ((sscanf(v->value, "%30d", &global_mwitime) != 1) || (global_mwitime < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid MWI time setting at line %d. Using default (10).\n", v->value, v->lineno);
global_mwitime = DEFAULT_MWITIME;
}
} else if (!strcasecmp(v->name, "vmexten")) {
ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten));
} else if (!strcasecmp(v->name, "rtptimeout")) {
- if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) {
+ if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
global_rtptimeout = 0;
}
} else if (!strcasecmp(v->name, "rtpholdtimeout")) {
- if ((sscanf(v->value, "%d", &global_rtpholdtimeout) != 1) || (global_rtpholdtimeout < 0)) {
+ if ((sscanf(v->value, "%30d", &global_rtpholdtimeout) != 1) || (global_rtpholdtimeout < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno);
global_rtpholdtimeout = 0;
}
} else if (!strcasecmp(v->name, "rtpkeepalive")) {
- if ((sscanf(v->value, "%d", &global_rtpkeepalive) != 1) || (global_rtpkeepalive < 0)) {
+ if ((sscanf(v->value, "%30d", &global_rtpkeepalive) != 1) || (global_rtpkeepalive < 0)) {
ast_log(LOG_WARNING, "'%s' is not a valid RTP keepalive time at line %d. Using default.\n", v->value, v->lineno);
global_rtpkeepalive = 0;
}
@@ -18173,7 +18173,7 @@ static int reload_config(enum channelreloadreason reason)
ast_log(LOG_WARNING, "Unable to locate host '%s'\n", v->value);
} else if (!strcasecmp(v->name, "outboundproxyport")) {
/* Port needs to be after IP */
- sscanf(v->value, "%d", &format);
+ sscanf(v->value, "%30d", &format);
outboundproxyip.sin_port = htons(format);
} else if (!strcasecmp(v->name, "autocreatepeer")) {
autocreatepeer = ast_true(v->value);
@@ -18234,7 +18234,7 @@ static int reload_config(enum channelreloadreason reason)
memcpy(&externip.sin_addr, hp->h_addr, sizeof(externip.sin_addr));
externexpire = time(NULL);
} else if (!strcasecmp(v->name, "externrefresh")) {
- if (sscanf(v->value, "%d", &externrefresh) != 1) {
+ if (sscanf(v->value, "%30d", &externrefresh) != 1) {
ast_log(LOG_WARNING, "Invalid externrefresh value '%s', must be an integer >0 at line %d\n", v->value, v->lineno);
externrefresh = 10;
}
@@ -18282,7 +18282,7 @@ static int reload_config(enum channelreloadreason reason)
if (ast_str2tos(v->value, &global_tos_video))
ast_log(LOG_WARNING, "Invalid tos_video value at line %d, recommended value is 'af41'. See doc/ip-tos.txt.\n", v->lineno);
} else if (!strcasecmp(v->name, "bindport")) {
- if (sscanf(v->value, "%d", &ourport) == 1) {
+ if (sscanf(v->value, "%5d", &ourport) == 1) {
bindaddr.sin_port = htons(ourport);
} else {
ast_log(LOG_WARNING, "Invalid port number '%s' at line %d of %s\n", v->value, v->lineno, config);
@@ -18292,7 +18292,7 @@ static int reload_config(enum channelreloadreason reason)
default_qualify = 0;
} else if (!strcasecmp(v->value, "yes")) {
default_qualify = DEFAULT_MAXMS;
- } else if (sscanf(v->value, "%d", &default_qualify) != 1) {
+ } else if (sscanf(v->value, "%30d", &default_qualify) != 1) {
ast_log(LOG_WARNING, "Qualification default should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", v->lineno);
default_qualify = 0;
}
@@ -18909,7 +18909,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
memset(lport, 0, sizeof(lport));
localtmp++;
/* This is okey because lhost and lport are as big as tmp */
- sscanf(localtmp, "%[^<>:; ]:%[^<>:; ]", lhost, lport);
+ sscanf(localtmp, "%80[^<>:; ]:%80[^<>:; ]", lhost, lport);
if (ast_strlen_zero(lhost)) {
ast_log(LOG_ERROR, "Can't find the host address\n");
return 0;
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 983dbf847..3c511ca24 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -4756,7 +4756,7 @@ static int reload_config(void)
} else if (!strcasecmp(v->name, "disallow")) {
ast_parse_allow_disallow(&default_prefs, &default_capability, v->value, 0);
} else if (!strcasecmp(v->name, "bindport") || !strcasecmp(v->name, "port")) {
- if (sscanf(v->value, "%d", &ourport) == 1) {
+ if (sscanf(v->value, "%5d", &ourport) == 1) {
bindaddr.sin_port = htons(ourport);
} else {
ast_log(LOG_WARNING, "Invalid bindport '%s' at line %d of %s\n", v->value, v->lineno, config);
diff --git a/channels/iax2-provision.c b/channels/iax2-provision.c
index b6137a88b..b980cfea0 100644
--- a/channels/iax2-provision.c
+++ b/channels/iax2-provision.c
@@ -246,7 +246,7 @@ int iax_provision_version(unsigned int *version, const char *template, int force
ast_mutex_lock(&provlock);
ast_db_get("iax/provisioning/cache", template, tmp, sizeof(tmp));
- if (sscanf(tmp, "v%x", version) != 1) {
+ if (sscanf(tmp, "v%30x", version) != 1) {
if (strcmp(tmp, "u")) {
ret = iax_provision_build(&ied, version, template, force);
if (ret)
@@ -305,7 +305,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
v = ast_variable_browse(cfg, s);
while(v) {
if (!strcasecmp(v->name, "port") || !strcasecmp(v->name, "serverport")) {
- if ((sscanf(v->value, "%d", &x) == 1) && (x > 0) && (x < 65535)) {
+ if ((sscanf(v->value, "%5d", &x) == 1) && (x > 0) && (x < 65535)) {
if (!strcasecmp(v->name, "port")) {
cur->port = x;
foundportno = 1;
diff --git a/channels/misdn_config.c b/channels/misdn_config.c
index 71f54adcc..1cbd19021 100644
--- a/channels/misdn_config.c
+++ b/channels/misdn_config.c
@@ -891,9 +891,9 @@ static int _parse (union misdn_cfg_pt *dest, char *value, enum misdn_cfg_type ty
{
char *pat;
if (strchr(value,'x'))
- pat="%x";
+ pat="%30x";
else
- pat="%d";
+ pat="%30d";
if (sscanf(value, pat, &tmp)) {
dest->num = (int *)malloc(sizeof(int));
memcpy(dest->num, &tmp, sizeof(int));
@@ -907,7 +907,7 @@ static int _parse (union misdn_cfg_pt *dest, char *value, enum misdn_cfg_type ty
break;
case MISDN_CTYPE_BOOLINT:
dest->num = (int *)malloc(sizeof(int));
- if (sscanf(value, "%d", &tmp)) {
+ if (sscanf(value, "%30d", &tmp)) {
memcpy(dest->num, &tmp, sizeof(int));
} else {
*(dest->num) = (ast_true(value) ? boolint_def : 0);
@@ -974,7 +974,7 @@ static void _build_port_config (struct ast_variable *v, char *cat)
for (token = strsep(&v->value, ","); token; token = strsep(&v->value, ","), *ptpbuf = 0) {
if (!*token)
continue;
- if (sscanf(token, "%d-%d%s", &start, &end, ptpbuf) >= 2) {
+ if (sscanf(token, "%30d-%30d%s", &start, &end, ptpbuf) >= 2) {
for (; start <= end; start++) {
if (start <= max_ports && start > 0) {
cfg_for_ports[start] = 1;
@@ -983,7 +983,7 @@ static void _build_port_config (struct ast_variable *v, char *cat)
CLI_ERROR(v->name, v->value, cat);
}
} else {
- if (sscanf(token, "%d%s", &start, ptpbuf)) {
+ if (sscanf(token, "%30d%s", &start, ptpbuf)) {
if (start <= max_ports && start > 0) {
cfg_for_ports[start] = 1;
ptp[start] = (strstr(ptpbuf, "ptp")) ? 1 : 0;
diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c
index 6eff087d3..c2b4a4369 100644
--- a/codecs/codec_speex.c
+++ b/codecs/codec_speex.c
@@ -402,7 +402,7 @@ static void parse_config(void)
} else
ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n");
} else if (!strcasecmp(var->name, "vbr_quality")) {
- if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0 && res_f <= 10) {
+ if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0 && res_f <= 10) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting VBR Quality to %f\n",res_f);
vbr_quality = res_f;
@@ -451,7 +451,7 @@ static void parse_config(void)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Preprocessor AGC. [%s]\n",pp_agc ? "on" : "off");
} else if (!strcasecmp(var->name, "pp_agc_level")) {
- if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0) {
+ if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting preprocessor AGC Level to %f\n",res_f);
pp_agc_level = res_f;
@@ -466,14 +466,14 @@ static void parse_config(void)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Preprocessor Dereverb. [%s]\n",pp_dereverb ? "on" : "off");
} else if (!strcasecmp(var->name, "pp_dereverb_decay")) {
- if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0) {
+ if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting preprocessor Dereverb Decay to %f\n",res_f);
pp_dereverb_decay = res_f;
} else
ast_log(LOG_ERROR,"Error! Preprocessor Dereverb Decay must be >= 0\n");
} else if (!strcasecmp(var->name, "pp_dereverb_level")) {
- if (sscanf(var->value, "%f", &res_f) == 1 && res_f >= 0) {
+ if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "CODEC SPEEX: Setting preprocessor Dereverb Level to %f\n",res_f);
pp_dereverb_level = res_f;
diff --git a/doc/CODING-GUIDELINES b/doc/CODING-GUIDELINES
index c3ffacd3c..67837e928 100644
--- a/doc/CODING-GUIDELINES
+++ b/doc/CODING-GUIDELINES
@@ -284,6 +284,18 @@ you wish to put into it (even if you did not allocate the buffer yourself),
use a direct strcpy(), as it can be inlined and optimized to simple
processor operations, unlike ast_copy_string().
+* String conversions
+--------------------
+
+When converting from strings to integers or floats, use the sscanf function
+in preference to the atoi and atof family of functions, as sscanf detects
+errors. Always check the return value of sscanf to verify that your numeric
+variables successfully scanned before using them. Also, to avoid a potential
+libc bug, always specify a maximum width for each conversion specifier,
+including integers and floats. A good length for both integers and floats is
+30, as this is more than generous, even if you're using doubles or long
+integers.
+
* Use of functions
------------------
diff --git a/funcs/func_channel.c b/funcs/func_channel.c
index d2e5c2c67..99f6d1e61 100644
--- a/funcs/func_channel.c
+++ b/funcs/func_channel.c
@@ -116,10 +116,10 @@ static int func_channel_write(struct ast_channel *chan, char *function,
} else if (!strcasecmp(data, "callgroup"))
chan->callgroup = ast_get_group(value);
else if (!strcasecmp(data, "txgain")) {
- sscanf(value, "%hhd", &gainset);
+ sscanf(value, "%4hhd", &gainset);
ast_channel_setoption(chan, AST_OPTION_TXGAIN, &gainset, sizeof(gainset), 0);
} else if (!strcasecmp(data, "rxgain")) {
- sscanf(value, "%hhd", &gainset);
+ sscanf(value, "%4hhd", &gainset);
ast_channel_setoption(chan, AST_OPTION_RXGAIN, &gainset, sizeof(gainset), 0);
} else if (!strcasecmp(data, "transfercapability")) {
unsigned short i;
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 1bafbd669..df17127c8 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -96,7 +96,7 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
}
*ptrvalue++ = '\0';
sortable_keys[count2].key = ptrkey;
- sscanf(ptrvalue, "%f", &sortable_keys[count2].value);
+ sscanf(ptrvalue, "%30f", &sortable_keys[count2].value);
count2++;
}
@@ -173,15 +173,15 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
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 {
diff --git a/funcs/func_math.c b/funcs/func_math.c
index edded7575..76d9deff6 100644
--- a/funcs/func_math.c
+++ b/funcs/func_math.c
@@ -165,12 +165,12 @@ static int math(struct ast_channel *chan, char *cmd, char *parse,
return -1;
}
- if (sscanf(mvalue1, "%lf", &fnum1) != 1) {
+ if (sscanf(mvalue1, "%30lf", &fnum1) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue1);
return -1;
}
- if (sscanf(mvalue2, "%lf", &fnum2) != 1) {
+ if (sscanf(mvalue2, "%30lf", &fnum2) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue2);
return -1;
}
diff --git a/funcs/func_rand.c b/funcs/func_rand.c
index 53952d341..ea6d7d393 100644
--- a/funcs/func_rand.c
+++ b/funcs/func_rand.c
@@ -53,10 +53,10 @@ static int acf_rand_exec(struct ast_channel *chan, char *cmd,
AST_STANDARD_APP_ARGS(args, parse);
- if (ast_strlen_zero(args.min) || sscanf(args.min, "%d", &min_int) != 1)
+ if (ast_strlen_zero(args.min) || sscanf(args.min, "%30d", &min_int) != 1)
min_int = 0;
- if (ast_strlen_zero(args.max) || sscanf(args.max, "%d", &max_int) != 1)
+ if (ast_strlen_zero(args.max) || sscanf(args.max, "%30d", &max_int) != 1)
max_int = RAND_MAX;
if (max_int < min_int) {
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 8b0d562ba..39b647913 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -289,7 +289,7 @@ static int acf_sprintf(struct ast_channel *chan, char *cmd, char *data, char *bu
/* Convert the argument into the required type */
if (arg.var[argcount]) {
- if (sscanf(arg.var[argcount++], "%d", &tmpi) != 1) {
+ if (sscanf(arg.var[argcount++], "%30d", &tmpi) != 1) {
ast_log(LOG_ERROR, "Argument '%s' is not an integer number for format '%s'\n", arg.var[argcount - 1], formatbuf);
goto sprintf_fail;
}
@@ -312,7 +312,7 @@ static int acf_sprintf(struct ast_channel *chan, char *cmd, char *data, char *bu
/* Convert the argument into the required type */
if (arg.var[argcount]) {
- if (sscanf(arg.var[argcount++], "%lf", &tmpd) != 1) {
+ if (sscanf(arg.var[argcount++], "%30lf", &tmpd) != 1) {
ast_log(LOG_ERROR, "Argument '%s' is not a floating point number for format '%s'\n", arg.var[argcount - 1], formatbuf);
goto sprintf_fail;
}
diff --git a/main/acl.c b/main/acl.c
index 4a5e16485..8f388a3d7 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -328,7 +328,7 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
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;
@@ -447,7 +447,7 @@ int ast_str2tos(const char *value, unsigned int *tos)
int fval;
unsigned int x;
- if (sscanf(value, "%i", &fval) == 1) {
+ if (sscanf(value, "%30i", &fval) == 1) {
*tos = fval & 0xFF;
return 0;
}
diff --git a/main/asterisk.c b/main/asterisk.c
index e0b76eab1..d915b4bdb 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -1117,7 +1117,7 @@ static int ast_makesocket(void)
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));
@@ -1891,10 +1891,10 @@ static char *cli_prompt(EditLine *el)
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;
}
@@ -1940,13 +1940,13 @@ static char *cli_prompt(EditLine *el)
float avg1, avg2, avg3;
int actproc, totproc, npid, which;
- if (fscanf(LOADAVG, "%f %f %f %d/%d %d",
+ if (fscanf(LOADAVG, "%30f %30f %30f %30d/%30d %30d",
&avg1, &avg2, &avg3, &actproc, &totproc, &npid) != 6) {
ast_log(LOG_WARNING, "parsing /proc/loadavg failed\n");
fclose(LOADAVG);
break;
}
- if (sscanf(t, "%d", &which) == 1) {
+ if (sscanf(t, "%30d", &which) == 1) {
switch (which) {
case 1:
snprintf(p, sizeof(prompt) - strlen(prompt), "%.2f", avg1);
@@ -2582,7 +2582,7 @@ static void ast_readconfig(void)
/* 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);
}
#if HAVE_WORKING_FORK
@@ -2630,7 +2630,7 @@ static void ast_readconfig(void)
} else if (!strcasecmp(v->name, "internal_timing")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_INTERNAL_TIMING);
} 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")) {
@@ -2639,7 +2639,7 @@ static void ast_readconfig(void)
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 */
@@ -2774,11 +2774,11 @@ int main(int argc, char *argv[])
ast_set_flag(&ast_options, AST_OPT_FLAG_MUTE);
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':
diff --git a/main/cdr.c b/main/cdr.c
index cd051003b..1e413c640 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -1428,7 +1428,7 @@ static int do_reload(void)
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 (cfg_size < 0)
ast_log(LOG_WARNING, "Invalid maximum batch size '%d' specified, using default\n", cfg_size);
@@ -1436,7 +1436,7 @@ static int do_reload(void)
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 (cfg_time < 0)
ast_log(LOG_WARNING, "Invalid maximum batch time '%d' specified, using default\n", cfg_time);
diff --git a/main/channel.c b/main/channel.c
index 67aa76636..073189207 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4780,9 +4780,9 @@ ast_group_t ast_get_group(const char *s)
c = ast_strdupa(s);
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 {
diff --git a/main/cli.c b/main/cli.c
index fe39334c1..b928fde63 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -319,7 +319,7 @@ static int handle_set_debug(int fd, int argc, char *argv[])
if (argc > 5)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[3], "%d", &newlevel) != 1)
+ if (sscanf(argv[3], "%30d", &newlevel) != 1)
return RESULT_SHOWUSAGE;
if (argc == 4) {
@@ -334,7 +334,7 @@ static int handle_set_debug(int fd, int argc, char *argv[])
if (argc < 5 || argc > 6)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[4], "%d", &newlevel) != 1)
+ if (sscanf(argv[4], "%30d", &newlevel) != 1)
return RESULT_SHOWUSAGE;
if (argc == 5) {
@@ -387,7 +387,7 @@ static int handle_debuglevel_deprecated(int fd, int argc, char *argv[])
char *filename = "<any>";
if ((argc < 3) || (argc > 4))
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &newlevel) != 1)
+ if (sscanf(argv[2], "%30d", &newlevel) != 1)
return RESULT_SHOWUSAGE;
option_debug = newlevel;
if (argc == 4) {
diff --git a/main/dnsmgr.c b/main/dnsmgr.c
index deb5c73db..6be5720d0 100644
--- a/main/dnsmgr.c
+++ b/main/dnsmgr.c
@@ -380,7 +380,7 @@ static int do_reload(int loading)
enabled = ast_true(enabled_value);
}
if ((interval_value = ast_variable_retrieve(config, "general", "refreshinterval"))) {
- if (sscanf(interval_value, "%d", &interval) < 1)
+ if (sscanf(interval_value, "%30d", &interval) < 1)
ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", interval_value);
else if (interval < 0)
ast_log(LOG_WARNING, "Invalid refresh interval '%d' specified, using default\n", interval);
diff --git a/main/frame.c b/main/frame.c
index cf13b6a29..9de8a700a 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -765,7 +765,7 @@ static int show_codec_n_deprecated(int fd, int argc, char *argv[])
if (argc != 3)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2],"%d",&codec) != 1)
+ if (sscanf(argv[2],"%30d",&codec) != 1)
return RESULT_SHOWUSAGE;
for (i = 0; i < 32; i++)
@@ -787,7 +787,7 @@ static int show_codec_n(int fd, int argc, char *argv[])
if (argc != 4)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[3],"%d",&codec) != 1)
+ if (sscanf(argv[3],"%30d",&codec) != 1)
return RESULT_SHOWUSAGE;
for (i = 0; i < 32; i++)
diff --git a/main/indications.c b/main/indications.c
index 64f96b5d5..8255e20f0 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -236,46 +236,46 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
s++;
else if (d.reppos == -1)
d.reppos = d.nitems;
- if (sscanf(s, "%d+%d/%d", &freq1, &freq2, &time) == 3) {
+ if (sscanf(s, "%30d+%30d/%30d", &freq1, &freq2, &time) == 3) {
/* f1+f2/time format */
- } else if (sscanf(s, "%d+%d", &freq1, &freq2) == 2) {
+ } else if (sscanf(s, "%30d+%30d", &freq1, &freq2) == 2) {
/* f1+f2 format */
time = 0;
- } else if (sscanf(s, "%d*%d/%d", &freq1, &freq2, &time) == 3) {
+ } else if (sscanf(s, "%30d*%30d/%30d", &freq1, &freq2, &time) == 3) {
/* f1*f2/time format */
modulate = 1;
- } else if (sscanf(s, "%d*%d", &freq1, &freq2) == 2) {
+ } else if (sscanf(s, "%30d*%30d", &freq1, &freq2) == 2) {
/* f1*f2 format */
time = 0;
modulate = 1;
- } else if (sscanf(s, "%d/%d", &freq1, &time) == 2) {
+ } else if (sscanf(s, "%30d/%30d", &freq1, &time) == 2) {
/* f1/time format */
freq2 = 0;
- } else if (sscanf(s, "%d", &freq1) == 1) {
+ } else if (sscanf(s, "%30d", &freq1) == 1) {
/* f1 format */
freq2 = 0;
time = 0;
- } else if (sscanf(s, "M%d+M%d/%d", &freq1, &freq2, &time) == 3) {
+ } else if (sscanf(s, "M%30d+M%30d/%30d", &freq1, &freq2, &time) == 3) {
/* Mf1+Mf2/time format */
midinote = 1;
- } else if (sscanf(s, "M%d+M%d", &freq1, &freq2) == 2) {
+ } else if (sscanf(s, "M%30d+M%30d", &freq1, &freq2) == 2) {
/* Mf1+Mf2 format */
time = 0;
midinote = 1;
- } else if (sscanf(s, "M%d*M%d/%d", &freq1, &freq2, &time) == 3) {
+ } else if (sscanf(s, "M%30d*M%30d/%30d", &freq1, &freq2, &time) == 3) {
/* Mf1*Mf2/time format */
modulate = 1;
midinote = 1;
- } else if (sscanf(s, "M%d*M%d", &freq1, &freq2) == 2) {
+ } else if (sscanf(s, "M%30d*M%30d", &freq1, &freq2) == 2) {
/* Mf1*Mf2 format */
time = 0;
modulate = 1;
midinote = 1;
- } else if (sscanf(s, "M%d/%d", &freq1, &time) == 2) {
+ } else if (sscanf(s, "M%30d/%30d", &freq1, &time) == 2) {
/* Mf1/time format */
freq2 = -1;
midinote = 1;
- } else if (sscanf(s, "M%d", &freq1) == 1) {
+ } else if (sscanf(s, "M%30d", &freq1) == 1) {
/* Mf1 format */
freq2 = -1;
time = 0;
diff --git a/main/manager.c b/main/manager.c
index 93fcd5a34..5a4df416d 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1329,7 +1329,7 @@ static int action_waitevent(struct mansession *s, const struct message *m)
snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
if (!ast_strlen_zero(timeouts)) {
- sscanf(timeouts, "%i", &timeout);
+ sscanf(timeouts, "%30i", &timeout);
}
ast_mutex_lock(&s->session->__lock);
@@ -1690,7 +1690,7 @@ static int action_redirect(struct mansession *s, const struct message *m)
astman_send_error(s, m, "Channel not specified");
return 0;
}
- if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
+ if (!ast_strlen_zero(priority) && (sscanf(priority, "%30d", &pi) != 1)) {
if ((pi = ast_findlabel_extension(NULL, context, exten, priority, NULL)) < 1) {
astman_send_error(s, m, "Invalid priority");
return 0;
@@ -1938,13 +1938,13 @@ static int action_originate(struct mansession *s, const struct message *m)
astman_send_error(s, m, "Channel not specified");
return 0;
}
- if (!ast_strlen_zero(priority) && (sscanf(priority, "%d", &pi) != 1)) {
+ if (!ast_strlen_zero(priority) && (sscanf(priority, "%30d", &pi) != 1)) {
if ((pi = ast_findlabel_extension(NULL, context, exten, priority, NULL)) < 1) {
astman_send_error(s, m, "Invalid priority");
return 0;
}
}
- if (!ast_strlen_zero(timeout) && (sscanf(timeout, "%d", &to) != 1)) {
+ if (!ast_strlen_zero(timeout) && (sscanf(timeout, "%30d", &to) != 1)) {
astman_send_error(s, m, "Invalid timeout");
return 0;
}
@@ -2790,7 +2790,7 @@ static char *generic_http_callback(int format, struct sockaddr_in *requestor, co
for (v = params; v; v = v->next) {
if (!strcasecmp(v->name, "mansession_id")) {
- sscanf(v->value, "%x", &ident);
+ sscanf(v->value, "%30x", &ident);
break;
}
}
@@ -3068,7 +3068,7 @@ int init_manager(void)
webenabled = ast_true(val);
if ((val = ast_variable_retrieve(cfg, "general", "port"))) {
- if (sscanf(val, "%d", &portno) != 1) {
+ if (sscanf(val, "%5d", &portno) != 1) {
ast_log(LOG_WARNING, "Invalid port number '%s'\n", val);
portno = DEFAULT_MANAGER_PORT;
}
diff --git a/main/pbx.c b/main/pbx.c
index b3a448214..f34661ce5 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -1095,7 +1095,7 @@ static int parse_variable_name(char *var, int *offset, int *length, int *isfunc)
parens--;
} else if (*var == ':' && parens == 0) {
*var++ = '\0';
- sscanf(var, "%d:%d", offset, length);
+ sscanf(var, "%30d:%30d", offset, length);
return 1; /* offset:length valid */
}
}
@@ -4069,7 +4069,7 @@ static int lookup_name(const char *s, char *const names[], int max)
if (!strcasecmp(s, names[i]))
return i+1;
}
- } else if (sscanf(s, "%d", &i) == 1 && i >= 1 && i <= max) {
+ } else if (sscanf(s, "%30d", &i) == 1 && i >= 1 && i <= max) {
return i;
}
return 0; /* error return */
@@ -4156,11 +4156,11 @@ static void get_timerange(struct ast_timing *i, char *times)
ast_log(LOG_WARNING, "Invalid time range. Assuming no restrictions based on time.\n");
return;
}
- if (sscanf(times, "%d:%d", &s1, &s2) != 2) {
+ if (sscanf(times, "%2d:%2d", &s1, &s2) != 2) {
ast_log(LOG_WARNING, "%s isn't a time. Assuming no restrictions based on time.\n", times);
return;
}
- if (sscanf(e, "%d:%d", &e1, &e2) != 2) {
+ if (sscanf(e, "%2d:%2d", &e1, &e2) != 2) {
ast_log(LOG_WARNING, "%s isn't a time. Assuming no restrictions based on time.\n", e);
return;
}
@@ -5369,7 +5369,7 @@ static void wait_for_hangup(struct ast_channel *chan, void *data)
struct ast_frame *f;
int waittime;
- if (ast_strlen_zero(data) || (sscanf(data, "%d", &waittime) != 1) || (waittime < 0))
+ if (ast_strlen_zero(data) || (sscanf(data, "%30d", &waittime) != 1) || (waittime < 0))
waittime = -1;
if (waittime > -1) {
ast_safe_sleep(chan, waittime * 1000);
@@ -6410,7 +6410,7 @@ int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
mode = -1;
pri++;
}
- if (sscanf(pri, "%d", &ipri) != 1) {
+ if (sscanf(pri, "%30d", &ipri) != 1) {
if ((ipri = ast_findlabel_extension(chan, context ? context : chan->context, exten ? exten : chan->exten,
pri, chan->cid.cid_num)) < 1) {
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0, or valid label\n", pri);
diff --git a/main/utils.c b/main/utils.c
index 6ff44dd48..8c601b3d7 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1349,7 +1349,7 @@ int ast_get_time_t(const char *src, time_t *dst, time_t _default, int *consumed)
return -1;
/* only integer at the moment, but one day we could accept more formats */
- if (sscanf(src, "%ld%n", &t, &scanned) == 1) {
+ if (sscanf(src, "%30ld%n", &t, &scanned) == 1) {
*dst = t;
if (consumed)
*consumed = scanned;
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 14ef9e740..0f994797f 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -91,7 +91,7 @@ int dundi_str_to_eid(dundi_eid *eid, char *s)
{
unsigned int eid_int[6];
int x;
- if (sscanf(s, "%x:%x:%x:%x:%x:%x", &eid_int[0], &eid_int[1], &eid_int[2],
+ if (sscanf(s, "%2x:%2x:%2x:%2x:%2x:%2x", &eid_int[0], &eid_int[1], &eid_int[2],
&eid_int[3], &eid_int[4], &eid_int[5]) != 6)
return -1;
for (x=0;x<6;x++)
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 655d09632..d999caacc 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -877,12 +877,12 @@ static void check_timerange(pval *p)
p->filename, p->startline, p->endline, p->u1.str);
warns++;
}
- if (sscanf(times, "%d:%d", &s1, &s2) != 2) {
+ if (sscanf(times, "%2d:%2d", &s1, &s2) != 2) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: The start time (%s) isn't quite right!\n",
p->filename, p->startline, p->endline, times);
warns++;
}
- if (sscanf(e, "%d:%d", &e1, &e2) != 2) {
+ if (sscanf(e, "%2d:%2d", &e1, &e2) != 2) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: The end time (%s) isn't quite right!\n",
p->filename, p->startline, p->endline, times);
warns++;
@@ -974,7 +974,7 @@ static void check_day(pval *DAY)
c++;
}
/* Find the start */
- if (sscanf(day, "%d", &s) != 1) {
+ if (sscanf(day, "%2d", &s) != 1) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: The start day of month (%s) must be a number!\n",
DAY->filename, DAY->startline, DAY->endline, day);
warns++;
@@ -986,7 +986,7 @@ static void check_day(pval *DAY)
}
s--;
if (c) {
- if (sscanf(c, "%d", &e) != 1) {
+ if (sscanf(c, "%2d", &e) != 1) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: The end day of month (%s) must be a number!\n",
DAY->filename, DAY->startline, DAY->endline, c);
warns++;
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index c16d22c9b..fd79cc48d 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1423,7 +1423,7 @@ static int handle_context_add_extension_deprecated(int fd, int argc, char *argv[
if (!strcmp(prior, "hint")) {
iprior = PRIORITY_HINT;
} else {
- if (sscanf(prior, "%d", &iprior) != 1) {
+ if (sscanf(prior, "%30d", &iprior) != 1) {
ast_cli(fd, "'%s' is not a valid priority\n", prior);
prior = NULL;
}
@@ -1516,7 +1516,7 @@ static int handle_context_add_extension(int fd, int argc, char *argv[])
if (!strcmp(prior, "hint")) {
iprior = PRIORITY_HINT;
} else {
- if (sscanf(prior, "%d", &iprior) != 1) {
+ if (sscanf(prior, "%30d", &iprior) != 1) {
ast_cli(fd, "'%s' is not a valid priority\n", prior);
prior = NULL;
}
@@ -2248,7 +2248,7 @@ static int pbx_load_config(const char *config_file)
ipri = lastpri;
else
ast_log(LOG_WARNING, "Can't use 'same' priority on the first entry!\n");
- } else if (sscanf(pri, "%d", &ipri) != 1 &&
+ } else if (sscanf(pri, "%30d", &ipri) != 1 &&
(ipri = ast_findlabel_extension2(NULL, con, realext, pri, cidmatch)) < 1) {
ast_log(LOG_WARNING, "Invalid priority/label '%s' at line %d\n", pri, v->lineno);
ipri = 0;
@@ -2395,9 +2395,9 @@ static void pbx_load_users(void)
c = zapcopy;
chan = strsep(&c, ",");
while (chan) {
- if (sscanf(chan, "%d-%d", &start, &finish) == 2) {
+ if (sscanf(chan, "%30d-%30d", &start, &finish) == 2) {
/* Range */
- } else if (sscanf(chan, "%d", &start)) {
+ } else if (sscanf(chan, "%30d", &start)) {
/* Just one */
finish = start;
} else {
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 8052c08fc..412e24e9a 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -1145,7 +1145,7 @@ static int cache_lookup_internal(time_t now, struct dundi_request *req, char *ke
if (expiration > 0) {
ast_log(LOG_DEBUG, "Found cache expiring in %d seconds!\n", expiration);
ptr += length + 1;
- while((sscanf(ptr, "%d/%d/%d/%n", &(flags.flags), &weight, &tech, &length) == 3)) {
+ while((sscanf(ptr, "%30d/%30d/%30d/%n", &(flags.flags), &weight, &tech, &length) == 3)) {
ptr += length;
term = strchr(ptr, '|');
if (term) {
@@ -4043,7 +4043,7 @@ static void build_mapping(char *name, char *value)
} else if (x >= 4) {
ast_copy_string(map->dcontext, name, sizeof(map->dcontext));
ast_copy_string(map->lcontext, fields[0], sizeof(map->lcontext));
- if ((sscanf(fields[1], "%d", &map->weight) == 1) && (map->weight >= 0) && (map->weight < 60000)) {
+ if ((sscanf(fields[1], "%30d", &map->weight) == 1) && (map->weight >= 0) && (map->weight < 60000)) {
ast_copy_string(map->dest, fields[3], sizeof(map->dest));
if ((map->tech = str2tech(fields[2]))) {
map->dead = 0;
@@ -4141,7 +4141,7 @@ static void populate_addr(struct dundi_peer *peer, dundi_eid *eid)
if (c) {
*c = '\0';
c++;
- if (sscanf(c, "%d:%d", &port, &expire) == 2) {
+ if (sscanf(c, "%5d:%30d", &port, &expire) == 2) {
/* Got it! */
inet_aton(data, &peer->addr.sin_addr);
peer->addr.sin_family = AF_INET;
@@ -4238,7 +4238,7 @@ static void build_peer(dundi_eid *eid, struct ast_variable *v, int *globalpcmode
peer->maxms = 0;
} else if (!strcasecmp(v->value, "yes")) {
peer->maxms = DEFAULT_MAXMS;
- } else if (sscanf(v->value, "%d", &peer->maxms) != 1) {
+ } else if (sscanf(v->value, "%30d", &peer->maxms) != 1) {
ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of dundi.conf\n",
dundi_eid_to_str(eid_str, sizeof(eid_str), &peer->eid), v->lineno);
peer->maxms = 0;
@@ -4473,14 +4473,14 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
} else if (!strcasecmp(v->name, "authdebug")) {
authdebug = ast_true(v->value);
} else if (!strcasecmp(v->name, "ttl")) {
- if ((sscanf(v->value, "%d", &x) == 1) && (x > 0) && (x < DUNDI_DEFAULT_TTL)) {
+ if ((sscanf(v->value, "%30d", &x) == 1) && (x > 0) && (x < DUNDI_DEFAULT_TTL)) {
dundi_ttl = x;
} else {
ast_log(LOG_WARNING, "'%s' is not a valid TTL at line %d, must be number from 1 to %d\n",
v->value, v->lineno, DUNDI_DEFAULT_TTL);
}
} else if (!strcasecmp(v->name, "autokill")) {
- if (sscanf(v->value, "%d", &x) == 1) {
+ if (sscanf(v->value, "%30d", &x) == 1) {
if (x >= 0)
global_autokilltimeout = x;
else
@@ -4496,7 +4496,7 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
else
ast_log(LOG_WARNING, "Invalid global endpoint identifier '%s' at line %d\n", v->value, v->lineno);
} else if (!strcasecmp(v->name, "tos")) {
- if (sscanf(v->value, "%d", &format) == 1)
+ if (sscanf(v->value, "%30d", &format) == 1)
tos = format & 0xff;
else if (!strcasecmp(v->value, "lowdelay"))
tos = IPTOS_LOWDELAY;
@@ -4533,7 +4533,7 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
} else if (!strcasecmp(v->name, "storehistory")) {
global_storehistory = ast_true(v->value);
} else if (!strcasecmp(v->name, "cachetime")) {
- if ((sscanf(v->value, "%d", &x) == 1)) {
+ if ((sscanf(v->value, "%30d", &x) == 1)) {
dundi_cache_time = x;
} else {
ast_log(LOG_WARNING, "'%s' is not a valid cache time at line %d. Using default value '%d'.\n",
diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c
index 042cbfb5f..d9a3e737b 100644
--- a/pbx/pbx_loopback.c
+++ b/pbx/pbx_loopback.c
@@ -129,7 +129,7 @@ static void loopback_parse(char **newexten, char **newcontext, int *priority, ch
if (!ast_strlen_zero(con))
*newcontext = con;
if (!ast_strlen_zero(pri))
- sscanf(pri, "%d", priority);
+ sscanf(pri, "%30d", priority);
}
static int loopback_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 3ab4e8385..30c430b69 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -190,7 +190,7 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
} else if (!strcasecmp(buf, "data")) {
ast_copy_string(o->data, c, sizeof(o->data));
} else if (!strcasecmp(buf, "maxretries")) {
- if (sscanf(c, "%d", &o->maxretries) != 1) {
+ if (sscanf(c, "%30d", &o->maxretries) != 1) {
ast_log(LOG_WARNING, "Invalid max retries at line %d of %s\n", lineno, fn);
o->maxretries = 0;
}
@@ -201,24 +201,24 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
} else if (!strcasecmp(buf, "extension")) {
ast_copy_string(o->exten, c, sizeof(o->exten));
} else if (!strcasecmp(buf, "priority")) {
- if ((sscanf(c, "%d", &o->priority) != 1) || (o->priority < 1)) {
+ if ((sscanf(c, "%30d", &o->priority) != 1) || (o->priority < 1)) {
ast_log(LOG_WARNING, "Invalid priority at line %d of %s\n", lineno, fn);
o->priority = 1;
}
} else if (!strcasecmp(buf, "retrytime")) {
- if ((sscanf(c, "%d", &o->retrytime) != 1) || (o->retrytime < 1)) {
+ if ((sscanf(c, "%30d", &o->retrytime) != 1) || (o->retrytime < 1)) {
ast_log(LOG_WARNING, "Invalid retrytime at line %d of %s\n", lineno, fn);
o->retrytime = 300;
}
} else if (!strcasecmp(buf, "waittime")) {
- if ((sscanf(c, "%d", &o->waittime) != 1) || (o->waittime < 1)) {
+ if ((sscanf(c, "%30d", &o->waittime) != 1) || (o->waittime < 1)) {
ast_log(LOG_WARNING, "Invalid waittime at line %d of %s\n", lineno, fn);
o->waittime = 45;
}
} else if (!strcasecmp(buf, "retry")) {
o->retries++;
} else if (!strcasecmp(buf, "startretry")) {
- if (sscanf(c, "%ld", &o->callingpid) != 1) {
+ if (sscanf(c, "%30ld", &o->callingpid) != 1) {
ast_log(LOG_WARNING, "Unable to retrieve calling PID!\n");
o->callingpid = 0;
}
diff --git a/res/res_agi.c b/res/res_agi.c
index 15ecaa516..fe53ebe68 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -448,7 +448,7 @@ static int handle_waitfordigit(struct ast_channel *chan, AGI *agi, int argc, cha
int to;
if (argc != 4)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[3], "%d", &to) != 1)
+ if (sscanf(argv[3], "%30d", &to) != 1)
return RESULT_SHOWUSAGE;
res = ast_waitfordigit_full(chan, to, agi->audio, agi->ctrl);
fdprintf(agi->fd, "200 result=%d\n", res);
@@ -558,7 +558,7 @@ static int handle_controlstreamfile(struct ast_channel *chan, AGI *agi, int argc
else
stop = NULL;
- if ((argc > 5) && (sscanf(argv[5], "%d", &skipms) != 1))
+ if ((argc > 5) && (sscanf(argv[5], "%30d", &skipms) != 1))
return RESULT_SHOWUSAGE;
if (argc > 6 && !ast_strlen_zero(argv[6]))
@@ -599,7 +599,7 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, char
if (argv[3])
edigits = argv[3];
- if ((argc > 4) && (sscanf(argv[4], "%ld", &sample_offset) != 1))
+ if ((argc > 4) && (sscanf(argv[4], "%30ld", &sample_offset) != 1))
return RESULT_SHOWUSAGE;
fs = ast_openstream(chan, argv[2], chan->language);
@@ -720,7 +720,7 @@ static int handle_saynumber(struct ast_channel *chan, AGI *agi, int argc, char *
int num;
if (argc != 4)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &num) != 1)
+ if (sscanf(argv[2], "%30d", &num) != 1)
return RESULT_SHOWUSAGE;
res = ast_say_number_full(chan, num, argv[3], chan->language, (char *) NULL, agi->audio, agi->ctrl);
if (res == 1)
@@ -736,7 +736,7 @@ static int handle_saydigits(struct ast_channel *chan, AGI *agi, int argc, char *
if (argc != 4)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &num) != 1)
+ if (sscanf(argv[2], "%30d", &num) != 1)
return RESULT_SHOWUSAGE;
res = ast_say_digit_str_full(chan, argv[2], argv[3], chan->language, agi->audio, agi->ctrl);
@@ -766,7 +766,7 @@ static int handle_saydate(struct ast_channel *chan, AGI *agi, int argc, char *ar
int num;
if (argc != 4)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &num) != 1)
+ if (sscanf(argv[2], "%30d", &num) != 1)
return RESULT_SHOWUSAGE;
res = ast_say_date(chan, num, argv[3], chan->language);
if (res == 1)
@@ -781,7 +781,7 @@ static int handle_saytime(struct ast_channel *chan, AGI *agi, int argc, char *ar
int num;
if (argc != 4)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &num) != 1)
+ if (sscanf(argv[2], "%30d", &num) != 1)
return RESULT_SHOWUSAGE;
res = ast_say_time(chan, num, argv[3], chan->language);
if (res == 1)
@@ -892,7 +892,7 @@ static int handle_setpriority(struct ast_channel *chan, AGI *agi, int argc, char
if (argc != 3)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &pri) != 1) {
+ if (sscanf(argv[2], "%30d", &pri) != 1) {
if ((pri = ast_findlabel_extension(chan, chan->context, chan->exten, argv[2], chan->cid.cid_num)) < 1)
return RESULT_SHOWUSAGE;
}
@@ -924,7 +924,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
if (argc < 6)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[5], "%d", &ms) != 1)
+ if (sscanf(argv[5], "%30d", &ms) != 1)
return RESULT_SHOWUSAGE;
if (argc > 6)
@@ -965,7 +965,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
/* backward compatibility, if no offset given, arg[6] would have been
* caught below and taken to be a beep, else if it is a digit then it is a
* offset */
- if ((argc >6) && (sscanf(argv[6], "%ld", &sample_offset) != 1) && (!strchr(argv[6], '=')))
+ if ((argc >6) && (sscanf(argv[6], "%30ld", &sample_offset) != 1) && (!strchr(argv[6], '=')))
res = ast_streamfile(chan, "beep", chan->language);
if ((argc > 7) && (!strchr(argv[7], '=')))
@@ -1085,7 +1085,7 @@ static int handle_autohangup(struct ast_channel *chan, AGI *agi, int argc, char
if (argc != 3)
return RESULT_SHOWUSAGE;
- if (sscanf(argv[2], "%d", &timeout) != 1)
+ if (sscanf(argv[2], "%30d", &timeout) != 1)
return RESULT_SHOWUSAGE;
if (timeout < 0)
timeout = 0;
@@ -1259,7 +1259,7 @@ static int handle_verbose(struct ast_channel *chan, AGI *agi, int argc, char **a
return RESULT_SHOWUSAGE;
if (argv[2])
- sscanf(argv[2], "%d", &level);
+ sscanf(argv[2], "%30d", &level);
switch (level) {
case 4:
diff --git a/res/res_features.c b/res/res_features.c
index b148bb71d..1813268fd 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -367,7 +367,7 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan)
* limitation here. If extout was not numeric, we could permit
* arbitrary non-numeric extensions.
*/
- if (sscanf(parkingexten, "%d", &parking_space) != 1 || parking_space < 0) {
+ if (sscanf(parkingexten, "%30d", &parking_space) != 1 || parking_space < 0) {
ast_log(LOG_WARNING, "PARKINGEXTEN does not indicate a valid parking slot: '%s'.\n", parkingexten);
ast_mutex_unlock(&parking_lock);
free(pu);
@@ -2787,7 +2787,7 @@ static int manager_park(struct mansession *s, const struct message *m)
}
if (!ast_strlen_zero(timeout)) {
- sscanf(timeout, "%d", &to);
+ sscanf(timeout, "%30d", &to);
}
res = ast_masq_park_call(ch1, ch2, to, &parkExt);
@@ -2904,13 +2904,13 @@ static int load_config(void)
} else if (!strcasecmp(var->name, "context")) {
ast_copy_string(parking_con, var->value, sizeof(parking_con));
} else if (!strcasecmp(var->name, "parkingtime")) {
- if ((sscanf(var->value, "%d", &parkingtime) != 1) || (parkingtime < 1)) {
+ if ((sscanf(var->value, "%30d", &parkingtime) != 1) || (parkingtime < 1)) {
ast_log(LOG_WARNING, "%s is not a valid parkingtime\n", var->value);
parkingtime = DEFAULT_PARK_TIME;
} else
parkingtime = parkingtime * 1000;
} else if (!strcasecmp(var->name, "parkpos")) {
- if (sscanf(var->value, "%d-%d", &start, &end) != 2) {
+ if (sscanf(var->value, "%30d-%30d", &start, &end) != 2) {
ast_log(LOG_WARNING, "Format for parking positions is a-b, where a and b are numbers at line %d of features.conf\n", var->lineno);
} else {
parking_start = start;
@@ -2959,18 +2959,18 @@ static int load_config(void)
} else if (!strcasecmp(var->name, "adsipark")) {
adsipark = ast_true(var->value);
} else if (!strcasecmp(var->name, "transferdigittimeout")) {
- if ((sscanf(var->value, "%d", &transferdigittimeout) != 1) || (transferdigittimeout < 1)) {
+ if ((sscanf(var->value, "%30d", &transferdigittimeout) != 1) || (transferdigittimeout < 1)) {
ast_log(LOG_WARNING, "%s is not a valid transferdigittimeout\n", var->value);
transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
} else
transferdigittimeout = transferdigittimeout * 1000;
} else if (!strcasecmp(var->name, "featuredigittimeout")) {
- if ((sscanf(var->value, "%d", &featuredigittimeout) != 1) || (featuredigittimeout < 1)) {
+ if ((sscanf(var->value, "%30d", &featuredigittimeout) != 1) || (featuredigittimeout < 1)) {
ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value);
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
}
} else if (!strcasecmp(var->name, "atxfernoanswertimeout")) {
- if ((sscanf(var->value, "%d", &atxfernoanswertimeout) != 1) || (atxfernoanswertimeout < 1)) {
+ if ((sscanf(var->value, "%30d", &atxfernoanswertimeout) != 1) || (atxfernoanswertimeout < 1)) {
ast_log(LOG_WARNING, "%s is not a valid atxfernoanswertimeout\n", var->value);
atxfernoanswertimeout = DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER;
} else
diff --git a/res/res_odbc.c b/res/res_odbc.c
index be174aab1..961e30044 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -247,7 +247,7 @@ static int load_odbc_config(void)
if (ast_true(v->value))
pooling = 1;
} else if (!strcasecmp(v->name, "limit")) {
- sscanf(v->value, "%d", &limit);
+ sscanf(v->value, "%4d", &limit);
if (ast_true(v->value) && !limit) {
ast_log(LOG_WARNING, "Limit should be a number, not a boolean: '%s'. Setting limit to 1023 for ODBC class '%s'.\n", v->value, cat);
limit = 1023;
@@ -261,7 +261,7 @@ static int load_odbc_config(void)
limit = 1023;
}
} else if (!strcasecmp(v->name, "idlecheck")) {
- sscanf(v->value, "%d", &idlecheck);
+ sscanf(v->value, "%30u", &idlecheck);
} else if (!strcasecmp(v->name, "enabled")) {
enabled = ast_true(v->value);
} else if (!strcasecmp(v->name, "pre-connect")) {
@@ -610,7 +610,7 @@ static int reload(void)
if (!strcasecmp(v->name, "pooling")) {
pooling = 1;
} else if (!strcasecmp(v->name, "limit")) {
- sscanf(v->value, "%d", &limit);
+ sscanf(v->value, "%4d", &limit);
if (ast_true(v->value) && !limit) {
ast_log(LOG_WARNING, "Limit should be a number, not a boolean: '%s'. Setting limit to 1023 for ODBC class '%s'.\n", v->value, cat);
limit = 1023;
@@ -620,7 +620,7 @@ static int reload(void)
break;
}
} else if (!strcasecmp(v->name, "idlecheck")) {
- sscanf(v->value, "%ud", &idlecheck);
+ sscanf(v->value, "%30u", &idlecheck);
} else if (!strcasecmp(v->name, "enabled")) {
enabled = ast_true(v->value);
} else if (!strcasecmp(v->name, "pre-connect")) {
diff --git a/res/res_smdi.c b/res/res_smdi.c
index f26e2ac25..55179d78d 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -910,7 +910,7 @@ static int smdi_load(int reload)
baud_rate = B9600;
}
} else if (!strcasecmp(v->name, "msdstrip")) {
- if (!sscanf(v->value, "%d", &msdstrip)) {
+ if (!sscanf(v->value, "%30d", &msdstrip)) {
ast_log(LOG_NOTICE, "Invalid msdstrip value in %s (line %d), using default\n", config_file, v->lineno);
msdstrip = 0;
} else if (0 > msdstrip || msdstrip > 9) {
@@ -918,7 +918,7 @@ static int smdi_load(int reload)
msdstrip = 0;
}
} else if (!strcasecmp(v->name, "msgexpirytime")) {
- if (!sscanf(v->value, "%ld", &msg_expiry)) {
+ if (!sscanf(v->value, "%30ld", &msg_expiry)) {
ast_log(LOG_NOTICE, "Invalid msgexpirytime value in %s (line %d), using default\n", config_file, v->lineno);
msg_expiry = SMDI_MSG_EXPIRY_TIME;
}
@@ -1052,7 +1052,7 @@ static int smdi_load(int reload)
continue;
}
} else if (!strcasecmp(v->name, "pollinginterval")) {
- if (sscanf(v->value, "%u", &mwi_monitor.polling_interval) != 1) {
+ if (sscanf(v->value, "%30u", &mwi_monitor.polling_interval) != 1) {
ast_log(LOG_ERROR, "Invalid value for pollinginterval: %s\n", v->value);
mwi_monitor.polling_interval = DEFAULT_POLLING_INTERVAL;
}
@@ -1173,7 +1173,7 @@ static int smdi_msg_retrieve_read(struct ast_channel *chan, char *cmd, char *dat
}
if (!ast_strlen_zero(args.timeout)) {
- if (sscanf(args.timeout, "%u", &timeout) != 1) {
+ if (sscanf(args.timeout, "%30u", &timeout) != 1) {
ast_log(LOG_ERROR, "'%s' is not a valid timeout\n", args.timeout);
timeout = SMDI_RETRIEVE_TIMEOUT_DEFAULT;
}
diff --git a/utils/frame.c b/utils/frame.c
index bdc65e12f..d1d3832a7 100644
--- a/utils/frame.c
+++ b/utils/frame.c
@@ -355,7 +355,7 @@ int parsetime(char *string, int *result)
double temp;
char m, s, end;
- k = sscanf(string, "%lf%c%c%c", &temp, &m, &s, &end);
+ k = sscanf(string, "%30lf%1c%1c%1c", &temp, &m, &s, &end);
switch (k)
{
case 0: case EOF: case 4:
@@ -396,7 +396,7 @@ int parsefreq(char *string, double *result)
double temp;
char m, s, end;
- k = sscanf(string, "%lf%c%c%c", &temp, &m, &s, &end);
+ k = sscanf(string, "%30lf%1c%1c%1c", &temp, &m, &s, &end);
switch (k)
{
case 0: case EOF: case 2: case 4:
@@ -476,7 +476,7 @@ int parseintarg( int argcount, char *args[], char *string, int *result)
if ((i = findoption( argcount, args, string)) > 0)
{
switch (sscanf(args[i] + 1 + strlen( string),
- "%d%c", &temp, &c))
+ "%30d%1c", &temp, &c))
{
case 0: case EOF: case 2:
argerrornum(args[i]+1, ME_NOINT);
@@ -510,7 +510,7 @@ int parsedoublearg( int argcount, char *args[], char *string, double *result)
if ((i = findoption( argcount, args, string)) > 0)
{
- switch (sscanf(args[i] + 1 + strlen( string), "%lf%c", &temp, &end))
+ switch (sscanf(args[i] + 1 + strlen( string), "%30lf%1c", &temp, &end))
{
case 0: case EOF: case 2:
argerrornum(args[i]+1, ME_NODOUBLE);
@@ -545,7 +545,7 @@ int parsevolarg( int argcount, char *args[], char *string, double *result)
if ((i = findoption( argcount, args, string)) > 0)
{
switch (sscanf(args[i] + 1 + strlen( string),
- "%lf%c%c%c", &vol, &sbd, &sbb, &end))
+ "%30lf%1c%1c%1c", &vol, &sbd, &sbb, &end))
{
case 0: case EOF: case 4:
weird = TRUE;
@@ -593,7 +593,7 @@ int parsevolume(char *s, double *result)
char sbd, sbb, end;
*result = 1.0;
- k = sscanf(s, "%lf%c%c%c", result, &sbd, &sbb, &end);
+ k = sscanf(s, "%30lf%1c%1c%1c", result, &sbd, &sbb, &end);
switch (k)
{
case 0:
diff --git a/utils/muted.c b/utils/muted.c
index 5aa7a79d7..be276fdf4 100644
--- a/utils/muted.c
+++ b/utils/muted.c
@@ -156,7 +156,7 @@ static int load_config(void)
} else if (!strcasecmp(buf, "smoothfade")) {
smoothfade = 1;
} else if (!strcasecmp(buf, "mutelevel")) {
- if (val && (sscanf(val, "%d", &x) == 1) && (x > -1) && (x < 101)) {
+ if (val && (sscanf(val, "%3d", &x) == 1) && (x > -1) && (x < 101)) {
mutelevel = x;
} else
fprintf(stderr, "mutelevel must be a number from 0 (most muted) to 100 (no mute) at line %d\n", lineno);
@@ -216,7 +216,7 @@ static int connect_asterisk(void)
if (ports) {
*ports = '\0';
ports++;
- if ((sscanf(ports, "%d", &port) != 1) || (port < 1) || (port > 65535)) {
+ if ((sscanf(ports, "%5d", &port) != 1) || (port < 1) || (port > 65535)) {
fprintf(stderr, "'%s' is not a valid port number in the hostname\n", ports);
return -1;
}