mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1001,7 +1001,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) {
|
||||
@@ -1009,7 +1009,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;
|
||||
}
|
||||
@@ -1142,7 +1142,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;
|
||||
}
|
||||
@@ -1263,7 +1263,7 @@ static int smdi_msg_retrieve_read(struct ast_channel *chan, const char *cmd, cha
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user